Hi Erik,

We use retained messages and have observed that very behavior.  We needed every 
new joining client to receive the full system state (retained messages from 
both broker A and broker B).

What we did to achieve that was go to a single active broker and a standby 
broker.  Retained messages with QoS 1 & 2 are replicated to the standby broker 
if you are using  Replication.  If you are using QoS = 0, then those messages 
are considered not durable by the broker and they are not replicated to the 
standby broker instance.  If you are using Shared Store they will be there 
because of the shared disk.

Best Regards,
Paul

From: Devriendt, Erik <erik.devrie...@siemens.com.INVALID>
Date: Wednesday, May 8, 2024 at 4:57 AM
To: users@activemq.apache.org <users@activemq.apache.org>
Subject: MQTT retained messages and federation
Hello all

I have a question about retained messages in MQTT.

I have 2 federated activeMQ Artemis 2.32.0 brokers A and B.

When I start a MQTT client on broker A that publishes a retained message on a 
given topic and then exits, a second MQTT subscriber client started later and 
connected to that same broker does receive the retained message.
However, a MQTT subscriber client connecting to broker B does not receive the 
retained message. It does receive messages when the publishing client on broker 
A is actively publishing messages.

Is this known behavior?
Is there a way to provide the retained message also to late subscribers on 
broker B?

Reply via email to