← Back to team overview

mosquitto-users team mailing list archive

Retained messages

 

I have:

   - A publisher client (X) which has cleanSession=true and sends messages
   as retained.
   - The subscribing client (Y) which also has cleanSesion=true.


This is what happens:

   1. The publisher sends 3 messages to a topic /A/B. The messages are set
   to retained.
   2. The subscriber connects and subscribes to /A/B.
   3. The subscriber gets all 3 messages.

How can I set it up so the subscriber get only the last message in the
topic?

Thanks

Follow ups