Industrial Internet of Things
What you should know about MQTT in automation

MQTT is an important protocol for communication in the Internet of Things. It is increasingly being used in automation. What you need to know:
What is MQTT? What is it about?
MQTT stands for Message Queuing Telemetry Transport. It is an open network protocol for information exchange between machines (Machine-to-Machine Communication / M2M).
Who invented MQTT?
The history of MQTT began in 1999. The companies IBM and Arcom Control Systems were tasked with developing a system for remote monitoring of oil and gas pipelines. Due to the then rudimentary mobile data infrastructure, the protocol messages had to be small enough to be transmitted via satellite.
How does MQTT work?
MQTT uses a publish/subscribe model, where devices can publish messages and other devices can subscribe to receive them. At the centre is a central server called a broker, which acts as an intermediary between different devices and systems. Data transfer occurs in a so-called topic, with naming similar to a file structure, for example, "Smart-Factory/ProductionLine1/Machine2". MQTT uses simple text-based formats like JSON or XML and is therefore very bandwidth efficient.
What is special about MQTT?
MQTT has a number of special features that make the protocol very useful and easy to implement:
- Scalable: MQTT is capable of supporting large networks with many thousands of devices.
- Offline capability: MQTT supports message caching when devices are offline and delivers the stored messages upon reconnection.
- Detection: When new devices are added to the network, they are automatically detected and can act as publishers or subscribers.
- QoS: A different quality of service (QoS) can be set for each client-broker connection:
0 (at most once): Message is sent only once, without acknowledgment of receipt.
1 (at least once): Message is sent multiple times until acknowledgment of receipt occurs.
2 (exactly once): Message is sent only once with acknowledgment of receipt.
What is the current version of MQTT?
The current version is MQTT 5.0, which was released as an OASIS standard in March 2019. This version offers a significant number of new features compared to previous versions and addresses various criticisms that existed in earlier versions:
- Improved mechanisms for authentication and authorisation: with the newly introduced AUTH package, the SASL (Simple Authentication and Security Layer) framework is now supported.
- Extensibility of the protocol: by specifying user properties, i.e., application-specific headers, the protocol is now much more extensible. In addition to the pure payload, any type of metadata can now be attached to an MQTT packet.
- Performance improvements for small clients: long topic names, for example, lead to a large packet overhead. Topic aliases allow the topic name to be replaced by a two-byte integer value. This can save bandwidth.
What is the "last will" in MQTT?
The "last will" in MQTT is a special message sent by a device when it leaves the network involuntarily or fails. This function is important so that the protocol works even with unreliable connections.
How can MQTT be used for industrial automation?
In industrial automation, MQTT can be used in many areas to improve communication between devices and systems. Here are some examples:
- Monitoring of machines and processes: With MQTT, data from sensors and machines can be sent to monitoring systems to enable a quick response to potential failures or issues. MQTT can also be used to collect data from control systems and send it to higher-level systems to control and monitor the production process.
- Energy consumption: MQTT can be used to collect data from energy measuring devices and send it to energy management systems.
- Supply chain data: With MQTT, data from supply chain sensors can be collected and sent to systems to monitor and manage delivery status.
What are the disadvantages of MQTT?
As with any technology protocol, there are some disadvantages and weaknesses with MQTT that should be considered. Here are some of them:
- Data integrity: MQTT does not provide integrity checking of transmitted data, which can lead to loss or misinterpretation of data.
- Data security: MQTT does not offer built-in security for transmitted data, so it is important that data transmission occurs over a secure connection and that data is protected using encryption technologies.
- Transmission rate: MQTT is not optimised for very high transmission rates and can become slow in applications with large amounts of data.
How does MQTT differ from OPC UA?
MQTT and OPC UA are both protocols used in industrial automation for data transmission and control of devices and systems. However, they have different purposes and characteristics.
OPC UA (OPC Unified Architecture) is an open communication protocol specifically developed for industrial automation. It offers high integrity and availability of data. OPC UA is a robust protocol suitable for use in complex industrial environments. However, its implementation is not trivial. The description of the standard spans several thousand pages.
MQTT (Message Queuing Telemetry Transport), on the other hand, is a very "lightweight" protocol specifically developed for the transmission of data in wireless networks and for applications with limited resources such as small devices. It is easy to implement and use.
MQTT originates more from the IT sector and is also supported by many cloud providers like Azure and AWS. OPC UA is backed by major players in the mechanical engineering and automation industry. It is more aimed at operational technology (OT) in manufacturing operations.
In many - especially complex - industrial applications, a combination of MQTT and OPC UA can also be sensible.