Martin Tappler created AMQ-6360:
-----------------------------------

             Summary: MQTT: retained messages not resent after repeated 
subscription
                 Key: AMQ-6360
                 URL: https://issues.apache.org/jira/browse/AMQ-6360
             Project: ActiveMQ
          Issue Type: Bug
          Components: MQTT
    Affects Versions: 5.13.3
         Environment: Ubuntu Linux 14.04.
            Reporter: Martin Tappler
            Priority: Minor


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.??




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to