Home » Insights » MQTT – A lightweight publish/subscribe messaging protocol

MQTT – A lightweight publish/subscribe messaging protocol

MQTT (Message Queuing Telemetry Transport) is an increasingly popular protocol, particularly for transmitting data from physical devices to the cloud. Although the protocol has been around for more than 20 years, it has only recently gained significant traction as a key enabler of the Internet of Things (IoT).

Its lightweight design allows for efficient use of available bandwidth and makes it well-suited for high-latency environments. For this reason, MQTT is an ideal protocol for machine-to-machine (M2M) communication.

In this article, we will explore the reasons behind this in more detail.

MQTT, a lightweight publish/subscribe messaging protocol
What does an MQTT broker do?

In a publish/subscribe communication model, participants operate with a high degree of independence. This is because clients communicate asynchronously. At the center of this architecture is the broker, which acts as the hub of communication. Clients connect to the broker and can function as publishers, subscribers, or both.
When the broker receives a message from a publisher, it distributes that message to all clients that have subscribed to the relevant topic.

How does it work?

Instead of a traditional client/server architecture, MQTT uses the publish/subscribe principle for data transmission. The protocol is also highly flexible in terms of ‘quality of service’ (an agreement between sender and recipient regarding the guarantee of message delivery). Thanks to its lightweight nature, the protocol can also be implemented in devices with limited resources. How MQTT works

What brokers are available?

There are various MQTT brokers available on the market, ranging from open-source solutions (e.g., Mosquitto) to commercial platforms (e.g., HiveMQ).

Data Payloads – What are topics and payloads?

In addition to its flexible communication model, MQTT allows full flexibility in message content.
Messages are addressed using topics, which follow a hierarchical structure—similar to a URL. Messages with freely defined content (payloads) are then published to these topics. JSON is commonly used as a payload format, as it is both human-readable and easy for software to process.
To provide structure and consistency, standards such as Sparkplug B or OPC UA Pub/Sub can be applied. These add metadata to the payload, allowing subscribers to interpret the structure and type of data more effectively.
MQTT clients that support these standards can communicate more efficiently and reliably.

MQTT in industrial automation

MQTT is becoming increasingly important in industrial automation. Major cloud providers such as Microsoft, Google, and Amazon favor MQTT for data ingestion and offer dedicated entry points, such as Azure IoT Hub.
At the same time, the simplicity of MQTT allows it to be embedded in a wide range of devices—from full-scale systems to small embedded platforms such as Raspberry Pi or Arduino boards.
Today, many sensors are already capable of publishing data directly via MQTT.

Which products support MQTT?

Many modern data acquisition and data storage solutions now support MQTT out of the box. Below is a brief overview, including links to more detailed information about our products.

More insights