Control packet types mqtt reserved

23 views
Skip to first unread message

Jonathas Alberto

unread,
Sep 3, 2017, 9:05:51 AM9/3/17
to MQTT
In the documentation, section 2.2.1 describes the types of packages and yours values, I would like to know why the values 0 and 15 are reserved?
Thanks

Nick O'Leary

unread,
Sep 3, 2017, 5:52:08 PM9/3/17
to mq...@googlegroups.com
There are 16 available values in the 4 bits of the fixed header, but the protocol only defines 14 packet types. The unused values, 0 and 15 are reserved for future versions of the protocol and shouldn't be used by proprietary implementations. Not much else to it.

Nick

On 3 September 2017 at 14:05, Jonathas Alberto <jonathas...@gmail.com> wrote:
In the documentation, section 2.2.1 describes the types of packages and yours values, I would like to know why the values 0 and 15 are reserved?
Thanks

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Andy Stanford-Clark

unread,
Sep 5, 2017, 5:12:29 PM9/5/17
to mq...@googlegroups.com
just one small comment to add to that: a long time ago we agreed that message type 0 will never be used, as that is what you’d accidentally send if you forgot to fill in the message type and just sent the default value most languages would initialise a variable to.
To avoid any unintended consequences, we agreed to mark 0 as an invalid message type.

Andy


To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages