Question regarding QoS 1&2 for persistent client when offline

78 views
Skip to first unread message

James

unread,
Mar 17, 2015, 2:24:31 AM3/17/15
to mq...@googlegroups.com

  Hi all,

 I got a question regarding delivering QoS 1&2 for a durable client (cleanSession=false).

 The MQTT broker will persist all the messages with QoS 1 & 2 for a durable client even it is offline (not connected), and deliver the messages once the client connects again.

 So what should server do if millions of messages were persisted (queued) for this client when it connects again ?
 As i understand server should deliver those messages before delivering any new messages.  Is this a common use case?
 
 What's the best way for MQTT server to handle this kind of situation ?

 thanks,

- James

Laing, Michael

unread,
Mar 17, 2015, 5:40:52 AM3/17/15
to mq...@googlegroups.com
mosquitto has this in mosquitto.conf(5) man page:

       persistent_client_expiration duration
           This option allows persistent clients (those with clean session set to false) to be removed if they do not reconnect within a certain time
           frame. This is a non-standard option. As far as the MQTT spec is concerned, persistent clients persist forever.
...

 Expiring a client session cleans up the message references persisted for that client.

We use something less than an hour for this option. When a client comes back in after the old session has expired it resubscribes to get what it missed from retained storage.

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages