Sparkplug B is the current payload definition of Eclipse Sparkplug, an open specification that tells MQTT clients in industrial systems which topic names to use, how to encode data, and how to report whether a device is online.
MQTT defines how messages travel, not what they look like. Its specification sets no topic naming scheme and no payload format, and it leaves session state for each project to work out. Sparkplug fills those three gaps so that devices and applications from different vendors can work together without custom mapping.
Every Sparkplug topic follows one structure: namespace/group_id/message_type/edge_node_id/[device_id]. For Sparkplug B the namespace is spBv1.0. The payload is encoded with Google Protocol Buffers and carries metrics with timestamps, complex data types and metadata. An earlier encoding, Sparkplug A, is no longer supported.
State is handled with birth and death certificates. When an edge node connects, it publishes a birth message with all its current metric values. Its death certificate is registered as the MQTT Will Message, so subscribers still receive it if the connection drops without warning. After the birth message, the specification recommends report by exception: publish a value only when it changes. An edge node can also name one primary host application and hold its data until that host is back online.
Sparkplug is maintained by the Eclipse Sparkplug Working Group at the Eclipse Foundation. Version 3.0.0 of the specification is dated November 2022. It makes no normative statements on security; that is left to the MQTT setup, such as TLS and client authentication.
Plain MQTT vs Sparkplug B
| Plain MQTT | Sparkplug B | |
|---|---|---|
| Topic names | Not defined; each project chooses | One fixed structure that starts with spBv1.0 |
| Payload | Not defined: JSON, binary or anything else | Google Protocol Buffers, with typed metrics and timestamps |
| Device state | A Will Message is available; how to use it is up to you | Birth and death certificates for edge nodes, devices and host applications |
| When data is sent | Up to the publisher | Report by exception is recommended after the birth message |
| Maintained by | OASIS | Eclipse Sparkplug Working Group |
Questions about Sparkplug B
Is Sparkplug B a protocol?
No. It is a specification that runs on top of MQTT. The transport is still MQTT; Sparkplug adds rules for topic names, payload encoding and session state.
What is the difference between Sparkplug A and Sparkplug B?
They are two payload encodings. Sparkplug B came shortly after A and added metric timestamps, complex data types and metadata. The specification says Sparkplug A is no longer supported.
What does spBv1.0 mean?
It is the first element of every Sparkplug B topic. "sp" identifies Sparkplug, "B" is the payload encoding scheme, and "v1.0" is the version of that scheme.
Related terms
MQTT
MQTT is a lightweight publish/subscribe messaging protocol, an OASIS standard, in which devices send messages to named topics on a broker and any subscribed application receives them.
Unified namespace (UNS)
A unified namespace (UNS) is an architecture pattern in which plant and business systems publish their current data to one shared, hierarchically organized hub, usually an MQTT broker, instead of exchanging it through point-to-point integrations.
OPC UA
OPC UA (OPC Unified Architecture) is a platform-independent, open standard for exchanging industrial data securely between machines, controllers and software, published by the OPC Foundation and standardized as IEC 62541.
SCADA
SCADA (supervisory control and data acquisition) is a computerized system that gathers data from remote or distributed equipment and lets operators monitor and control it.