Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Abandoned
-
5.13.3
-
None
-
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:
- Client c1 connects to the broker by sending CONNECT
- c1 sends a retained message to topic t1
- c1 subscribes to t1, the subscription is acknowledged and the retained message is published to c1
- 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.