[
https://issues.apache.org/jira/browse/AMQ-6575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847443#comment-15847443
]
Stefan Nilsson commented on AMQ-6575:
-------------------------------------
A couple of sections from the MQTT 3.1.1-spec talking about *retained* message
handling.
bq. Retained messages do not form part of the Session state in the Server, they
MUST NOT be deleted when the Session ends [MQTT-3.1.2.7].
bq. If the RETAIN flag is set to 1, in a PUBLISH Packet sent by a Client to a
Server, the Server MUST store the Application Message and its QoS, so that it
can be delivered to future subscribers whose subscriptions match its topic name
[MQTT-3.3.1-5]. When a new subscription is established, the last retained
message, if any, on each matching topic name MUST be sent to the subscriber
[MQTT-3.3.1-6].
> Retained messages not persisted? (MQTT)
> ---------------------------------------
>
> Key: AMQ-6575
> URL: https://issues.apache.org/jira/browse/AMQ-6575
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, MQTT
> Affects Versions: 5.14.3
> Reporter: Stefan Nilsson
>
> *Issue*
> Retained message is not persisted (after restart?)
> *Steps to reproduce*
> # Client *c1* connects and publishes a message *m1* to topic *t1* with
> retain: *true* and QoS: *2*. Client then disconnects.
> # Client connect (with same clientId or different, both works) and *c1*
> subscribes to *t1*. *c1* recieves *m1*.
> However, if the broker is restarted and *step 2* is re-run, the *m1* is never
> recieved.
> Shouldn't a retained message with QoS-2 be persisted and send to clients even
> after restart?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)