Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3846

MQTT client does not reconnect on broker restart

XMLWordPrintable

    • Hide
      When you restart a broker, or a broker fails over, the active broker does not restore connections for previously-connected MQTT clients. To work around this issue, to reconnect an MQTT client, you need to manually call the `subscribe()` method on the client.
      Show
      When you restart a broker, or a broker fails over, the active broker does not restore connections for previously-connected MQTT clients. To work around this issue, to reconnect an MQTT client, you need to manually call the `subscribe()` method on the client.
    • Documented as Known Issue
    • Workaround Exists
    • Hide

      The workaround is to call subscribe every time the client reconnects.

       

      Show
      The workaround is to call subscribe every time the client reconnects.  
    • Hide

      1. Start AMQ 7 broker
      2. Compile and run the client the attached client 
      3. Check the hawtio console, we would see the topic being created and the consumer count =1
      4. Restart the broker and in hawtio we would see that the consumer count=0 and the client no longer receives messages

      Show
      1. Start AMQ 7 broker 2. Compile and run the client the attached client  3. Check the hawtio console, we would see the topic being created and the consumer count =1 4. Restart the broker and in hawtio we would see that the consumer count=0 and the client no longer receives messages

      In AMQ 7, mqtt client is not able to reconnect to the broker in the event of a broker restart of failover.

      The workaround is to call subscribe every time the client reconnects.

      This was not required in AMQ 6, In AMQ 6, the mqtt client is able to reconnect to the broker without having to call the subscribe method

       

       

              rhn-support-jbertram Justin Bertram
              rhn-support-hnaram Herambh Naram (Inactive)
              Michal Toth Michal Toth
              Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: