Subscribe and listen to AW’s podcast!
Subscribe and listen to the Automation World Gets Your Questions Answered podcast!
Listen Here

Advantages of a Smart MQTT Broker

Understanding how a smart MQTT broker provides ways to aggregate data streams, keep them consistent, and distribute them securely across a complex network to ensure the success of Internet of Things projects of any size or complexity.


MQTT is becoming a popular protocol for Industrial IoT (Internet of Things) data. Developed for connecting remote devices to a central server, it is lightweight, efficient, and secure. However, IoT implementations are growing larger and more complex, and demand is increasing for OT/IT connectivity. MQTT is now being called on to aggregate and send diverse collections of data values over increasingly complex network topologies.

To meet these challenges MQTT must get smarter. As a transport protocol, MQTT specifies that messages are simply carried—not read—like a letter in the post. But that doesn’t have to be the case. What would happen if the letter carrier could read the mail? In other words, what if we gave an MQTT broker the ability to parse the messages it carries? It would be able to handle messages more intelligently and include some information on the status of the data source or quality of the connection.

Data collection
A smart broker should be able to collect data in an intelligent way. For example, on large systems data can come from a wide variety of MQTT devices, each with its own message format. A broker that parses messages could convert these to a common message representation and make that available to all clients. Other data sources might include non-MQTT protocols such as OPC UA, Modbus, DDE, and others. A smart broker with protocol conversion capabilities could act as a gateway for this data to any MQTT client or cloud ser vice.

Data consistency
In real-time industrial systems, data consistency from source to consumer is vital. Data that’s stale or out of correct time sequence can lead to incorrect decisions. Any disconnects or network irregularities must be known.

Data can become inconsistent in several ways. If messages arrive at an MQTT broker faster than they can be delivered, some may be dropped. Or data from multiple message streams may get sent to a client out of sequence. Also, if a data source goes offline, the client may not know whether an unchanged value is current or stale.

A smart broker can ensure data consistency by queueing incoming data in an intelligent way, passing on only the latest values. It can also parse timestamps on messages from different data streams to sequence them properly, as well as pass along data and connection quality information with each value update.

Data security
Security is critical when accessing data from a production system. The MQTT push architecture that connects outbound through firewalls is quite secure, but many corporate security policies require isolating OT systems using a DMZ. This is problematic for MQTT since messages must be passed via two or more servers, while MQTT quality of service guarantees are only valid for a single sender-receiver hop. As a result, data at the end of a multi-hop daisy chain can become unreliable.

A smart broker that parses messages and converts protocols can solve this problem by using a tunnel. The device producing the MQTT data would connect to one instance of the smart broker. The message data, along with quality and timestamp information, gets tunnelled via a secure, TCP-enabled protocol to a second instance of the smart broker. That instance would convert the data back into MQTT, with values, timestamps, and quality codes intact.

Test Your Machine Learning Smarts
Take Automation World's machine learning quiz to prove your knowledge!
Take Quiz
Test Your Machine Learning Smarts
Discover New Content
Access Automation World's free educational content library!
Unlock Learning Here
Discover New Content