← Back to team overview

mosquitto-users team mailing list archive

Re: Retained messages

 

Hi Eurig,

I used this code to try and duplicate your result:
https://gist.github.com/oojah/5047905

It works ok for me - can you see where the difference lies with what
you are doing?

Cheers,

Roger


On Wed, Feb 27, 2013 at 12:31 PM, Eurig Jones <eurigjones@xxxxxxxxx> wrote:
> 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:
>
> The publisher sends 3 messages to a topic /A/B. The messages are set to
> retained.
> The subscriber connects and subscribes to /A/B.
> The subscriber gets all 3 messages.
>
> How can I set it up so the subscriber get only the last message in the
> topic?
>
> Thanks
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>


References