Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11691

Should resubscribe when reconnect MQTT

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.19.2
    • Fix Version/s: 2.19.3, 2.20.0
    • Component/s: camel-paho
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      There is a feature in MqttConnectOptions called setAutomaticReconnect
      https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setAutomaticReconnect-boolean-

      But, when it reconnect, it doesn't resubscribe the topics. Paho provide a callback : MqttCallbackExtended, it got called when connect completed. So we can subscribe the topics again in that callback.
      https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttCallbackExtended.html

      I check camel-paho source code, seems it use MqttCallback instead MqttCallbackExtended.

      Can anyone implement this feature?

      Thanks

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                abccbaandy abccbaandy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: