Understanding the MQTT Protocol Packet Structure

In this tutorial we will take a more detailed look at the MQTT protocol, and how MQTT messages or packets are formatted. We will be looking at: The MQTT message format. The MQTT message header Message fields and coding Control Message coding example Introduction MQTT is a binary based protocol were the control elements are binary bytes and not text strings. MQTT uses a command and command acknowledgement format. That means each command has an associated acknowledgement. Topic names, Client ID, User names and Passwords are encoded asĀ  UTF-8 strings. The Payload excluding MQTT protocol information like Client ID etc … Continue reading Understanding the MQTT Protocol Packet Structure