MQTT evaluation (1/2)
The MQ Telemetry Transport (MQTT) protocol is
o was invented by Dr Andy Stanford-Clark of IBM®
o Arlen Nipper of Arcom (now Eurotech), in 1999
The protocol is openly published with a royalty-free license
o has been widely implemented across a variety of industries
o MQTT.org, defines the protocol as follows
MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol
o It was designed as an extremely lightweight publish/subscribe messaging transport.
o It is useful for connections with remote locations where a small code footprint is
required and/or network bandwidth is at a premium
Message Queue Telemetry Transport
MQTT is a binary client-server publish/subscribe messaging transport protocol,
standardized by OASIS
It is lightweight, open, simple, and easy to implement
Designed with a minimal protocol overhead, this protocol is a good choice for a
variety of Machine-to-Machine (M2M) and Internet of Things applications
especially where a small code footprint is required and/or network bandwidth is at
About MQTT (1/2)
About MQTT (2/2)
MQTT utilizes many characteristics of the TCP transport, so the minimum
requirement for using MQTT is a working TCP stack, which is now available for even
the smallest microcontrollers
Lightweight publish/ subscribe protocol standard for traditional networks
• Separates Data (Payload) from Metadata (Topic)
The nomenclature of “MQTT-S” (sensors? security? sausages?) has been confusing to some people, so
recently there was a discussion about renaming the protocol to MQTT-SN.
The new name would be MQTT-SN, standing for exactly the same long name, MQTT for Sensor
Networks. Some people had assumed that the S in MQTT-S stood for secure, so we hope this change will
avoid that confusion.
As part of this change, the copy of the specification now available from the mqtt.org Documentation
page now reflects that name change, and links to all previous versions of the specification have been
MQTT for Sensor Networks is aimed at embedded devices on non-TCP/IP networks, whereas MQTT
itself explicitly expects a TCP/IP stack.
how can you get started with MQTT-SN? Here’s the exciting part – Really Small Message Broker and
Mosquitto are coming together in a new Eclipse project, called Eclipse Mosquitto (here’s the project proposal).
The RSMB source code is now available at Eclipse, and it has built-in MQTT-SN support… Ian Craggs
shares a very quick getting started guide on his blog. It turns out that Nicholas Humfrey’s tools for MQTT-
SN work well with RSMB as well!
Interesting historical fact: MQTT-S, MQTT-SN
MQTT excels in scenarios where reliable message delivery is crucial for an application
but a reliable network connection is not necessarily available, e.g. mobile networks.
Typical use cases of MQTT include:
MQTT implements the brokered publish / subscribe pattern:
The publish / subscribe pattern decouples a client (“publisher”)
which is sending a particular message from other clients (“subscribers”), which
are receiving the message
This means that the publisher and subscribers don’t know about the existence of
The clients do not know each other, but they know the message broker, which
filters all incoming messages and distributes them to the correct subscribers
MQTT parameters (cont…)
This decoupling of sender and receiver can be differentiated in three dimensions:
• Space decoupling: Publisher and subscriber do not need to know each other (for example, by IP address and port)
• Time decoupling: Publisher and subscriber do not need to be connected at the same time
• Synchronization decoupling: Operations on both components are not halted during publishing or receiving
MQTT is message oriented. Every message is a discrete chunk of data, opaque to the broker.
Every message is published to an address, known as a topic.
Clients may subscribe to multiple topics. Every client subscribed to a topic receives every message
published to the topic
For example, imagine a simple network with three clients and a central broker. All
three clients open TCP connections with the broker. Clients B and C subscribe to
the topic temperature .
MQTT is often compared to CoAP, a simplified version of HTTP developed for
It is a client/server protocol (generally the sensor acts as the server and the
consumer acts as a client and receives information) and is designed for interoperability
with the web.
Running over UDP, it doesn’t support encryption protocols and is not as secure as
MQTT, but ensures higher performances.
MQTT & CoAP