MQTT 256 Message Format indication and message metadata

  • Slides: 5
Download presentation
MQTT 256 Message Format indication and message metadata in general. Andrew Banks March 2016.

MQTT 256 Message Format indication and message metadata in general. Andrew Banks March 2016.

MQTT 256 metadata candidates Template. Id Id/[Value]Type (byte) Message format Byte Id/[Value] … Usage

MQTT 256 metadata candidates Template. Id Id/[Value]Type (byte) Message format Byte Id/[Value] … Usage Delimiter [Packet. Id (2 bytes)] Type of payload, eg Bytes, String, JSON Four byte unsigned integer Number of seconds during which message delivery will be attempted Correlator Four byte unsigned integer Identifier carried in request and response messages so that the request message can be associated with its response message Reply. To UTF-8 String The structured topic name carried in a request and which the response is sent to. User metadata Two byte length, byte[] Unspecified data for use by the client application Publication time to live

MQTT 256 Message Format indication and message metadata in general. Fixed Header Variable Header

MQTT 256 Message Format indication and message metadata in general. Fixed Header Variable Header Message Payload Existing MQTT 3. 1. 1 publish packet Pub(3), Flags, RL Topic. Name, Packet Identifier (if Qos 1, 2) Payload Encoding scheme ID/Value pairs with delimiter. Pub(3), Flags, RL Topic. Name, Packet Identifier (if Qos 1, 2), Id. X+Value. X, Id. Y+Value. Y, Delimiter Payload Encoding scheme Flags plus values. Pub(3), Flags, RL RL Remaining Length Topic. Name, Packet Identifier(if Qos 1, 2), Metadata flags, Metadata. X , Metadata. Y Payload

MQTT 256 Message Format indication and message metadata in general. Fixed Header Variable Header

MQTT 256 Message Format indication and message metadata in general. Fixed Header Variable Header Message Payload Encoding scheme length ID/Value pairs. Pub(3), Flags, RL Topic. Name, Packet Identifier (if Qos 1, 2), RL metadata, Id. X+Value. X, Id. Y+Value. Y Payload Encoding scheme remaining length Flags plus values. Pub(3), Flags, RL RL Remaining Length Topic. Name, Packet Identifier(if Qos 1, 2), RL metadata, Metadata flags, Metadata. X , Metadata. Y Payload

MQTT 256 Message Format indication and message metadata in general. • If the remaining

MQTT 256 Message Format indication and message metadata in general. • If the remaining length of the metadata is encoded in the same way as the fixed header remaining length then this consumes 1 byte if there is less than 127 bytes of metadata. • Consequently the id value method is no more expensive because the delimiter is saved. • The metadata flags method needs at least one extra byte if the length is added. RL Remaining Length