← Back to team overview

mosquitto-users team mailing list archive

Re: Question about QoS

 

So just using QoS > 1, switching off clean sessions, and using a static
client ID for the subscriber...

Publisher:
mosquitto_pub -q 2 -t test -m "andy"
mosquitto_pub -q 2 -t test -m "andy 1"
mosquitto_pub -q 2 -t test -m "andy 2"
....

Subscriber:
mosquitto_sub -c -i sub1  -t test -q 1
<kill or ctrl-c>
mosquitto_sub -c -i sub1  -t test -q 1
(receives messages sent since it was killed)


On Mon, Nov 12, 2012 at 3:14 PM, Joe Zhu <zhuzhuojiang@xxxxxxxxx> wrote:

> Andy,
> Thanks,
> Publication be masked as "retained" will keep the last message after
> subscription reconnect again no matter "clean session" as yes or not.
> I'm researching the paramter "claen session", but doesn't work. And it
> needs provide client id. And I did , the same.
> Like "mosquitto_sub -c -i joe -t joe/test"
> Do you know what I missed?
> Thanks again
>
>
> On Mon, Nov 12, 2012 at 7:53 PM, andypiperuk@xxxxxxxxx <
> andypiperuk@xxxxxxxxx> wrote:
>
>> So you need your client not to make a "clean session" and have the
>> publication be marked as "retained"
>>
>> Andy
>>
>> On Mon, Nov 12, 2012 at 10:57 AM, Joe Zhu <zhuzhuojiang@xxxxxxxxx> wrote:
>>
>>> Roger,
>>> I"m the new guy to use mosquitto.
>>> I have a question about QoS,
>>> I used "mosquitto_pub -t tokudu/[ID]  -q 1 -d  -m "this is for testing""
>>> to publish message, the subscription client can get the message if it is
>>> connecting when message is publishing.
>>>
>>> But message couldn't be delivered after client reconnect again if the
>>> message was published when subscription was on disconnect status even
>>> though I set QoS to 1 or 2.
>>>
>>> Anything I missed? I want the message can be delivered when subscription
>>> reconnected.
>>>
>>> Thanks for you help.
>>>
>>> --
>>> Joe Zhu
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>
>>
>> --
>> Andy Piper | Farnborough, Hampshire (UK)
>> blog: http://andypiper.co.uk   |   skype: andypiperuk
>> twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper
>>
>
>
>
> --
> Joe Zhu
>
>


-- 
Andy Piper | Farnborough, Hampshire (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper

Follow ups

References