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

MQTT LWT not sent after subsequent disconnects on same session

XMLWordPrintable

    • Critical

      Client Library: Paho MQTT Python

      The Will message functionality works as expected under the following conditions:

      The client connects with clean_session=True.
      The client connects with clean_session=False but uses a client_id for which no previous session exists on the broker.

      It does not work with clean_session=False and the same session.

      There might be something wrong with the producer, but I am not sure what should be done differently to provide the Will message on each reconnection.

      MQTT v3.1.1 Section 3.1.2.5 implies that the Will details provided in the CONNECT packet should be associated with the newly established network connection, regardless of whether a session is being resumed. The client should be able to update its Will message on reconnection without needing to start a new session.

      How to do it with a Paho Python client?

        1. mqtt_subscriber.py
          3 kB
          Zdenek Strmiska
        2. producer_simple.py
          4 kB
          Zdenek Strmiska

              rhn-support-jbertram Justin Bertram
              rhn-support-zstrmisk Zdenek Strmiska
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: