Retrieve all the retained message by wildcard when bridge Mosquitto to AWS IoT Core

Hello,

I have set up a bridge from Mosquitto to AWS IoT Core. All messages from Client 1 are being published to AWS IoT Core with the retained flag. However, AWS IoT Core does not retrieve all retained messages using the wildcard #; I have to subscribe to each specific topic to retrieve them.

Client 2 faces the same issue when connecting to Mosquitto. Do you have any suggestions on how to retrieve all retained messages using the wildcard # for clients connecting to Mosquitto?

Thanks

Hello,

If I understand correctly, you are saying that you publish messages to Mosquitto with the retained flag set, with client 1, but when client 2 subscribes to #, it does not receive all of those messages? Also, Mosquitto is bridged to AWS, but that doesn’t feel like it should matter if what I’ve described is correct. Could you please confirm?

Regards,

Roger

Hi,

just to be sure we have the right understanding about retain and topics. There is only a single retain message per topic stored in the broker. A new message with retain flag published to the same topic will replace the previous message on that topic.
But if you have 100 different topic with a retain message on each topic any client subscribing to # should receive the 100 retain message (one per topic).