Example usage for org.springframework.integration.mqtt.core ConsumerStopAction UNSUBSCRIBE_ALWAYS

List of usage examples for org.springframework.integration.mqtt.core ConsumerStopAction UNSUBSCRIBE_ALWAYS

Introduction

In this page you can find the example usage for org.springframework.integration.mqtt.core ConsumerStopAction UNSUBSCRIBE_ALWAYS.

Prototype

ConsumerStopAction UNSUBSCRIBE_ALWAYS

To view the source code for org.springframework.integration.mqtt.core ConsumerStopAction UNSUBSCRIBE_ALWAYS.

Click Source Link

Document

Always unsubscribe.

Usage

From source file:org.springframework.integration.mqtt.MqttAdapterTests.java

@Test
public void testStopActionAlways() throws Exception {
    final IMqttClient client = mock(IMqttClient.class);
    MqttPahoMessageDrivenChannelAdapter adapter = buildAdapter(client, false,
            ConsumerStopAction.UNSUBSCRIBE_ALWAYS);

    adapter.start();/*from  w  w w  .  j a v  a 2s  . co  m*/
    adapter.stop();
    verifyUnsubscribe(client);
}