-
Notifications
You must be signed in to change notification settings - Fork 32
MQTT UDP protocol specification
MQTT/UDP tries to be compatible as far as it is possible with MQTT. Network byte order, string encoding, etc is the same. See MQTT 3.1.1 specfication
Specific for MQTT/UDP is:
- MQTT/UDP message content specification including remote config spec.
- Tagged Tail packet structure extension
- Digital Signature extension
Packet format is just the same as in MQTT, but packet identifier field. Flag bits as of now are supposed to be zero. It is possible though to use QoS flags as a request for destination to send PUBACK packet back to acknowledge communication. This way some more reliable communication can be established.
Details: Packet type: PUBLISH
In MQTT/UDP SUBSCRIBE packet is used to request other party to publish topic right now.
Details: Packet type: SUBSCRIBE
PINGREQ packet is used to find all working nodes.
PINGRESP is sent by current protocol implementations as responce.
Details: Packet type: PINGREQ/PINGRESP
NB! Work in progress.
PUBACK packet is sent as answer to PUBLISH packet with non-zero QoS field ((flags & 0x6) >> 1
).
PUBACK contains 'reply-to' TTR with packet ID of PUBLISH packet we reply to. PUBACK packet's QoS field
is QoS of packet we reply to, but limited by sender application settings.
Sender is supposed to decide that PUBLISH message is delivered if:
- There is PUBACK received with correct reply-to and QoS equal to QoS of sent PUBLISH.
- There are multiple PUBACKs received with QoS less by one that QoS of sent PUBLISH. By default two such PUBACKS are needed. It is pretty OK to get PUBACK with QoS of zero.
Read more in online documentation