MQTT Sparkplug

A smart broker for MQTT Sparkplug

MQTT Sparkplug is a specification for MQTT that defines how data is sent and received.  Devices and sensors at the edge of a network can use Sparkplug to communicate with applications like SCADA systems, historians, and analytics programs.  All of this communication goes through an MQTT broker.

DataHub SmartBroker diagram

The DataHub program is a smart broker for MQTT Sparkplug.  Unlike other MQTT brokers, rather than simply passing data along, a DataHub instance interprets the Sparkplug message payloads and gives you these advantages:

Responds to errors

The DataHub program can identify out-of-order or lost messages from a device.  When that occurs, the DataHub program disconnects the device and allows it to reconnect.  This causes the device to re-send its startup (BIRTH) message, which will resynchronize all receiving applications, maintaining a single version of the truth.

Keeps all Sparkplug 2.2 applications synchronized

Whenever a new Sparkplug 2.2 application connects, the DataHub program synthesizes a BIRTH message for each connected device, allowing the application to receive and process DATA messages for those devices.  This feature works even for non-primary applications, and eliminates start-up order issues between devices and applications.

Resolves failed writes to devices

A DataHub program can use a timer to check all write requests to devices, to see whether the data value actually changed on the device.  If not, the DataHub program can force the device to disconnect, causing it to retransmit its BIRTH message.  This will resynchronize all applications listening to that device, maintaining a single version of the truth.

Adds data quality information

When converting MQTT Sparkplug to other protocols, the DataHub program can add quality information.  For example, when it converts Sparkplug data to OPC, the DataHub program can add OPC data quality.  It can set the data quality to Good for BIRTH or DATA messages, and to Not Connected for DEATH (shutdown) messages.

A versatile client for MQTT Sparkplug

In addition to being a smart broker, the DataHub program can also act as a Sparkplug client, in several ways:

Primary Application:

DataHub SmartBroker - Primary Application diagram

If you are building a Sparkplug 2.2 based system, the DataHub program can serve as your primary application. It can provide the WebView HMI, data logging, historian and Excel connectivity, alarms, email notifications, and more.

Non-Primary Application:

DataHub SmartBroker - Non-primary Application diagram

In a similar way, if you already have a Sparkplug 2.2 primary application, the DataHub program can connect to your system as a non-primary application, and provide any DataHub feature, such as WebView, data logging, historian and Excel connectivity, alarms, and email notifications.

Edge of Network Device:

DataHub SmartBroker - EoN Device diagram

If you need to feed non-Sparkplug data into an MQTT Sparkplug system, you can connect the DataHub program as an Edge of Network (EoN) device.  This will allow you to send data from sources like OPC DA and UA, Modbus TCP, database data, custom programs to your Sparkplug applications.