java.lang.Object
org.springframework.integration.mqtt.support.MqttUtils

public final class MqttUtils extends Object
MQTT Utilities.
Since:
5.4
Author:
Gary Russell
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.paho.client.mqttv3.MqttConnectOptions
    cloneConnectOptions(org.eclipse.paho.client.mqttv3.MqttConnectOptions options)
    Clone the MqttConnectOptions, except the serverUris.
    static void
    stopClientReconnectCycle(org.eclipse.paho.client.mqttv3.IMqttAsyncClient client)
    Perform a stopReconnectCycle() (via reflection) method on the provided client to clean up resources on client stop.
    static void
    stopClientReconnectCycle(org.eclipse.paho.mqttv5.client.IMqttAsyncClient client)
    Perform a stopReconnectCycle() (via reflection) method on the provided client to clean up resources on client stop.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • cloneConnectOptions

      public static org.eclipse.paho.client.mqttv3.MqttConnectOptions cloneConnectOptions(org.eclipse.paho.client.mqttv3.MqttConnectOptions options)
      Clone the MqttConnectOptions, except the serverUris.
      Parameters:
      options - the options to clone.
      Returns:
      the clone.
    • stopClientReconnectCycle

      public static void stopClientReconnectCycle(org.eclipse.paho.client.mqttv3.IMqttAsyncClient client)
      Perform a stopReconnectCycle() (via reflection) method on the provided client to clean up resources on client stop. TODO until the real fix in Paho library.
      Parameters:
      client - the MQTTv3 Paho client instance.
      Since:
      6.1.9
    • stopClientReconnectCycle

      public static void stopClientReconnectCycle(org.eclipse.paho.mqttv5.client.IMqttAsyncClient client)
      Perform a stopReconnectCycle() (via reflection) method on the provided client to clean up resources on client stop. TODO until the real fix in Paho library.
      Parameters:
      client - the MQTTv5 Paho client instance.
      Since:
      6.1.9