Category Archives: MQTT Protocol

MQTT is a lightweight, publish/subscribe messaging protocol designed to move small amounts of data efficiently across networks where bandwidth is scarce, latency varies, and connections are unreliable. Invented in 1999 by Andy Stanford-Clark and Arlen Nipper for connecting remote sensors over satellite links, it has since become an OASIS and ISO/IEC standard and one of the most widely used protocols in the Internet of Things.
This category is a complete technical reference for the MQTT protocol. The articles explain how MQTT actually works rather than just what it does: the decoupled publish/subscribe model and the role of the broker, the binary packet format and its 15 control packet types, topic structure and wildcards, and the three Quality of Service levels that guarantee delivery over unreliable transports. They also cover the session and reliability mechanisms (persistent sessions, retained messages, Last Will and Testament, and keep alive) and the protocol’s security layers.
A dedicated set of articles covers MQTT 5, the current version, including user properties, session and message expiry, shared subscriptions, topic aliases, the request/response pattern, flow control, and enhanced authentication.

MQTT 5 Request Response Pattern Explained: RPC Over MQTT

MQTT was born as a publish/subscribe protocol — messages flow from many publishers to many subscribers with no expectation of a response. This model fits telemetry perfectly: sensors publish, dashboards subscribe, nobody waits for anyone. But when you need one client to ask another client a specific question and get one specific answer back, pub/sub alone falls short.… Read More: MQTT 5 Request Response Pattern Explained: RPC Over MQTT »

MQTT 5 Correlation Data Explained: Request/Response Pattern

MQTT was designed for publish/subscribe — fire-and-forget messaging from many publishers to many subscribers. For two decades, that’s what MQTT did. If you wanted classic request/response (“send a query, get back exactly one answer for that query”), you had to use HTTP, AMQP, or roll your own correlation scheme on top of MQTT topics. MQTT 5 added native… Read More: MQTT 5 Correlation Data Explained: Request/Response Pattern »

MQTT 5 Topic Aliases Explained: Per-Connection Bandwidth

A factory floor PLC publishes temperature data to the topic factory/site-A/line-3/station-5/conveyor-7/motor/temperature every 100 milliseconds. That’s a 65-byte topic name sent 10 times per second, every second of every day. Over 24 hours, the topic name alone consumes 56 megabytes of bandwidth — not the payload, just the topic string. Multiply by hundreds of similar sensors and you have… Read More: MQTT 5 Topic Aliases Explained: Per-Connection Bandwidth »

MQTT 5 Reason Codes, Reason Strings, and Negative Acknowledgements

If you have ever debugged an MQTT 3.1.1 deployment where a client mysteriously refuses to connect, or where a publish silently fails to reach its subscribers, you have run into MQTT 3.1.1’s biggest weakness: it tells you almost nothing about what went wrong. The handful of CONNACK return codes are vague, most other packets carry no failure indicator… Read More: MQTT 5 Reason Codes, Reason Strings, and Negative Acknowledgements »