Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6360

MQTT: retained messages not resent after repeated subscription

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • 5.13.3
    • None
    • MQTT
    • None
    • Ubuntu Linux 14.04.

    Description

      I have noticed that the behaviour of the broker does not exactly conform to the MQTT specification in the following scenario:

      1. Client c1 connects to the broker by sending CONNECT
      2. c1 sends a retained message to topic t1
      3. c1 subscribes to t1, the subscription is acknowledged and the retained message is published to c1
      4. c1 subscribes to t1 again and the subscription is acknowledged, but the retained message is not sent again.

      Actually, the retained should be sent again in the last step. The following MQTT specification-statement deals with this issue:

      [MQTT-3.8.4-3] If a Server receives a SUBSCRIBE Packet containing a Topic Filter that is identical to an existing Subscription’s Topic Filter then it MUST completely replace that existing Subscription with a new subscription. The Topic Filter in the new Subscription will be identical to that in the previous Subscription, although its maximum QoS value could be different. Any existing retained messages matching the Topic Filter MUST be re-sent, but the flow of publications MUST NOT be interrupted.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mtappler Martin Tappler
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: