Packet ID for Will publish with Qos >= 1

35 views
Skip to first unread message

Andrea Selva

unread,
Feb 25, 2015, 5:08:21 PM2/25/15
to mq...@googlegroups.com
Hi list,
I've a little doubt about the behaviour of a broker once it has to publish a will message with QoS 1 or 2.
Suppose we have a client named PW that register a Will testament message to be published with QoS1 (so it need pub ack) at topic /willpub. Another client named SW subcribe to the topic /willpub, the client, now the PW client dies without a disconnect. Which Packet Identifier has to be used by the broker in the publishing phase of the will message?
Any valid ID that is not currently used by the session in any message interchange?

Thank you very much

  Andrea Selva

Nicholas O'Leary

unread,
Feb 25, 2015, 5:17:02 PM2/25/15
to mq...@googlegroups.com
Hi Andrea,

the broker should publish the will message to all clients subscribed to the topic just as it would any other message published to a topic the clients are subscribed to.

Message IDs are not globally managed, they are scoped to each client session. So the Will message will be published to each client with a message ID that is available within that client session.

Nick

--
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