
By Xavier Mesrobian
We all need consistent data. If the gas gauge on your car is stuck at half full, you might find yourself taking a long walk one night, gas can in hand.
Likewise, an operator monitoring an HMI or SCADA system needs to know exactly what’s happening on the physical device. Any disconnects or network irregularities must be known. Data that’s stale or out of correct time sequence can lead to incorrect decisions.
Systems that use MQTT are no exception. But a regular MQTT broker is just a pass-through mechanism, with no knowledge of the data it handles. A smart MQTT broker, on the other hand, parses the data as it flows through, and makes intelligent use of it.
Here are four ways a smart MQTT broker helps to ensure data consistency:

- Smart message queueing is needed in real-time systems to handle message overload. This happens when a data producer, like a sensor or other device, sends data faster than a consumer can receive it. A chronic overload requires the broker to drop messages.
A smart MQTT broker can implement an intelligent message queue that examines the message content and ensures that the latest value of every data item is delivered, even when earlier values are dropped. This keeps data at the consumer consistent with the physical reality of the producer.
- Latest value – Having the very latest value of the data is critical in an industrial system. Suppose, for example, in a burst of activity, a pump is switched on and off many times, with the final position being “OFF.” If that final MQTT message gets dropped by the broker, the HMI or SCADA system will show the pump as “ON.”
This kind of inconsistent data can lead to costly errors and system malfunctions. A regular MQTT broker without smart message queueing may drop that final, latest value, whereas a broker with smart message queueing ensures that it gets delivered. - Time order is preserved in a single MQTT message topic, but not necessarily among multiple topics. Events coming from different devices that occur in the order A then B then C could be delivered to an application as C then B then A, or any other ordering, which is an error in many industrial-control use cases.
A smart broker can preserve time order as it converts messages to other protocols for transmission to control systems or retransmission across a network. - Connection status – Regular MQTT brokers do not have a way to indicate that a data source is disconnected. The consuming application cannot tell the difference between an old value from a sensor that has failed, or a current value that has simply not changed recently.
The “last will” mechanism in MQTT designed to deal with this requires unreasonable levels of coupling between the producers and consumers of data, resulting in duplicate configuration and increased integration and maintenance costs.
A smart broker that monitors the condition of the data producers and the network can assign a quality code to each message and update it with each value change. This information can be included in the outgoing MQTT message. As a result, data consumers have some way to tell why a value is not changing.
These are four ways that a smart MQTT broker helps to ensure data consistency. If you use MQTT, and if consistent data is important to you, consider using a smart MQTT broker like the DataHub Smart MQTT Broker from Skkynet.
Xavier Mesrobian is the vice president, sales and marketing, at Skkynet Cloud Systems. He can be reached at xavier.mesrobian@skkynet.com.
This content is sponsored by Skkynet.