← Back to team overview

mosquitto-users team mailing list archive

Re: Problem with --disable-clean-session flag use

 

Hi Paul,

You need to subscribe with QoS>0 as well, I imagine that's the problem.

I did this:

mosquitto_sub -c --id myid1 -h test.mosquitto.org -t sensors/value -q 1
<kill mosquitto_sub>
mosquitto_pub -h test.mosquitto.org -t sensors/value -q 1 -m 6
mosquitto_sub -c --id myid1 -h test.mosquitto.org -t sensors/value -q 1
<see received message>

You can use the queue_qos0_messages option to allow queuing of QoS=0
messages, although this is something that the spec doesn't provide for
so won't be available in other brokers.

Cheers,

Roger



On Sun, Sep 1, 2013 at 5:36 PM, Paul Pinault <disk_91@xxxxxxxxxxx> wrote:
> Hello,
> I tried to use the option --disable-clean-session but I was not able to get
> the expected result. I assume by using this flag with mosquitto_sub i would
> be able to get the messages sent between two disconnection of the
> subscriber.
> In fact, I do not get the message sent during the disconnection time (even
> if sent with qos 1 & 2)
> Is it a bug and a misuse of this option or misunderstanding ?
>
> Version of misquitto is 1.2
>
> Here is the command used to publish (multiple time with different values)
> mosquitto_pub  -h www.myserver.com -t sensors/value -q 1 -m 6
>
> Here is the command used to subsribe (each time the same)
> mosquitto_sub --disable-clean-session --id myid1 -h www.myserver.com -t
> sensors/value
>
> Your help is welcome.
> Thank you
> Sincerely
> Paul
>
> --
> 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