Sparkplug is a specification for MQTT enabled devices and applications to send and receive messages in a stateful way. While MQTT is stateful by nature it doesn't ensure that all data on a receiving MQTT application is current or valid. Sparkplug provides a mechanism for ensuring that remote device or application data is current and valid.

Cirrus Link has open sourced the specification and made it available via the Eclipse Foundation. Links to various aspects of the project are below.

In addition, Cirrus Link offers MQTT/Sparkplug modules for the Inductive Automation Ignition platform. More information on those can be found here.

The examples here provide client libraries and reference implementations in various languages and for various devices to show how the device/remote application must connect and disconnect from the MQTT server. This includes device lifecycle messages such as the required birth and last will & testament messages that must be sent to ensure the edge node and device lifecycle state and data integrity.

The Sparkplug specification which explains these examples can be found below. There are two revisions of the specification that differ in how payloads are encoded. Both formats use Google Protocol Buffers but use different Protobuf definitions.

Sparkplug A utilizes the Eclipse Kura payload format. Sparkplug B is the preferred payload format and the 'A' version is rarely used. If you need a copy of the Sparkplug A specification you can contact support@cirrus-link.com.

Sparkplug B was developed to add additional features and capabilities that were not possible in the original Kura payload definition. These features include:

  • Complex data types using templates
  • Datasets
  • Richer metrics with the ability to add property metadata for each metric
  • Metric alias support to maintain rich metric naming while keeping bandwidth usage to a minimum
  • Historical data
  • File data

Sparkplug B Specification: https://www.eclipse.org/tahu/spec/Sparkplug%20Topic%20Namespace%20and%20State%20ManagementV2.2-with%20appendix%20B%20format%20-%20Eclipse.pdf

  • No labels