HomeResourcesWhat is Sparkplug B?
Industrial Data Architecture

What is Sparkplug B?

Sparkplug B is an open Eclipse Foundation specification that adds three things MQTT alone does not provide for industrial use: a standardized topic namespace, a strongly-typed Protobuf payload format, and a device lifecycle state management model based on birth and death certificates. It is what makes MQTT interoperable across devices from different vendors in industrial Unified Namespace architectures.

Last reviewed: 2026Reading time: ~9 minTopics: Sparkplug B, MQTT, birth certificates, EoN nodes, Protobuf, report by exception, UNS

What is Sparkplug B?

Sparkplug B is a specification created by Arlen Nipper (co-inventor of MQTT) and published as an open Eclipse Foundation standard under the Eclipse Tahu project. It defines how MQTT should be used in industrial IIoT environments, filling the gaps that MQTT's intentional flexibility leaves open: how topics should be structured, how payloads should be encoded, and how device connection state should be managed across the broker network.

MQTT was designed to be protocol-agnostic by design. The MQTT specification deliberately leaves topic naming, payload format, and application-level state management to the implementer. This flexibility made MQTT popular across many industries, but it created a fragmentation problem for industrial deployments: two devices both implementing MQTT could publish to completely different topic structures with incompatible payload formats, requiring custom integration code to reconcile them. Every vendor defined its own conventions, and every new device integration became its own project.

Sparkplug B solves this by defining a single set of conventions that any device or application claiming Sparkplug B compatibility must follow. A SCADA system or analytics platform that supports Sparkplug B can discover and subscribe to any Sparkplug B compliant device or gateway immediately, without any prior knowledge of that device's configuration, because all Sparkplug B devices follow the same topic structure and payload schema.

Sparkplug B is not a new protocol. It runs on top of MQTT 3.1.1 or MQTT 5.0 over standard TCP/IP. It does not replace MQTT; it defines how to use MQTT. Any standard MQTT broker (HiveMQ, EMQX, Mosquitto, N3uron's built-in broker) can carry Sparkplug B messages without modification. Sparkplug-aware applications add specific handling for birth/death messages and Protobuf payload decoding on top of normal MQTT client behavior.

Plain MQTT vs Sparkplug B: what changes

Understanding what Sparkplug B adds requires a clear picture of what plain MQTT leaves undefined and why that matters for multi-vendor industrial environments.

Plain MQTT

Flexible, but not interoperable by default

  • Topic structure is entirely user-defined. Vendor A publishes to factory/line1/temp; Vendor B publishes to Plant_Floor/L1/Temperature_C. Both are valid MQTT.
  • Payload format is undefined. Could be raw bytes, JSON, XML, CSV, or any proprietary binary format. Consumers must know the format in advance.
  • No device state management. No standard way to know whether a device is online, what metrics it publishes, or what types those metrics are.
  • No metric metadata. A value of 72.4 arrives with no information about what it represents, its engineering units, or its data type.
  • New subscribers receive no data until the next change event if no retained messages are configured.
Sparkplug B

Standardized, self-describing, discoverable

  • Topic structure is defined by the spec: spBv1.0/{group}/{msg_type}/{node}/{device}. Every Sparkplug B implementation uses this exact structure.
  • Payload is always Google Protocol Buffers (Protobuf), a compact binary format with defined fields for name, data type, value, engineering units, and timestamp.
  • Device state is managed through birth and death certificates. Subscribers always know whether a device is online and what metrics it will publish.
  • Every metric is self-describing. The payload carries the tag name, data type (Float32, Int32, String, Boolean...), and metadata alongside the value.
  • Birth certificates deliver the current state of all metrics immediately on subscription, so new consumers instantly have a complete picture.

The Sparkplug B topic namespace

The Sparkplug B topic namespace is the foundation of the specification's interoperability. Every Sparkplug B message is published to a topic that follows a fixed five-element structure:

Sparkplug B topic namespace structure
spBv1.0/{group_id}/{message_type}/{edge_node_id}/[device_id]Full topic format
spBv1.0Protocol version identifier (fixed)
AcmeCorp_CharlotteGroup ID: logical grouping of edge nodes
NBIRTHMessage type: one of nine defined types
Packaging_Line2Edge Node ID: the EoN node identifier
Filler_PLCDevice ID: specific device (optional)
Example data message:
spBv1.0/AcmeCorp_Charlotte/DDATA/Packaging_Line2/Filler_PLC

The Group ID and Edge Node ID are user-configurable UTF-8 alphanumeric strings (forward slashes, plus signs, and hash symbols are reserved and cannot be used). The Message Type element is not user-configurable: it is one of nine values defined by the Sparkplug B specification. This is what allows a Sparkplug-aware broker or application to immediately classify any incoming message by type without parsing the payload.

The nine Sparkplug B message types

The message type element in the topic is the mechanism Sparkplug B uses to define different message behaviors within the same namespace. Each type has a specific purpose in the device lifecycle and state management model:

Message typeDirectionPurpose
NBIRTHEdge → BrokerBirth certificate for an Edge of Network (EoN) node. Published as the first message when a node connects or reconnects. Contains the complete list of all metrics the node will publish, their data types, engineering units, and initial values.
NDEATHBroker (LWT)Death certificate for an EoN node. Pre-configured as a Last Will and Testament message when the node connects. The broker publishes it automatically if the node disconnects ungracefully.
NDATAEdge → BrokerData message from an EoN node. Published after NBIRTH whenever a metric value changes (report by exception). Contains only the metrics that changed, not the full metric list.
DBIRTHEdge → BrokerBirth certificate for a device behind an EoN node. Published when the EoN node establishes communication with a connected device. Contains the device's full metric list with types and initial values.
DDEATHEdge → BrokerDeath certificate for a device. Published by the EoN node when a connected device goes offline or loses communication, signaling to all subscribers that this device's data should no longer be considered current.
DDATAEdge → BrokerData message for a device. Published by the EoN node on behalf of a connected device when device metric values change. Same report-by-exception behavior and metric aliasing as NDATA.
NCMDHost → EdgeCommand message for an EoN node. Published by a Primary Host or application to send a write command to the node. Allows bidirectional communication.
DCMDHost → EdgeCommand message for a device behind an EoN node. The EoN node receives the command and translates it into the appropriate device-level write using the device's native protocol.
STATEHost ↔ BrokerPrimary Host Application state. Published by the Primary Host Application to signal its online/offline status to all EoN nodes.

The Protobuf payload: self-describing data

The Sparkplug B payload format is defined using Google Protocol Buffers (Protobuf), a compact binary serialization format. This is one of the most practically significant differences between plain MQTT and Sparkplug B for industrial deployments.

A plain MQTT JSON payload carrying a temperature reading might look like: {"value": 72.4}. This tells the consumer one thing: a number. The consumer must already know what this topic publishes, what units the value is in, and what data type to expect.

A Sparkplug B Protobuf payload for the same reading carries: the metric name ("Temperature_degC"), an integer alias for compact encoding, a millisecond-precision timestamp, the data type (Float), the value (72.4), historical and transient flags, and properties including engineering units and range limits. The metric is completely self-describing.

Protobuf's binary encoding is also significantly more compact than JSON for the same data, which is important for deployments on cellular networks or satellite links where bandwidth is expensive. The metric aliasing feature adds further efficiency: after the initial NBIRTH establishes the full metric name, subsequent NDATA and DDATA messages can reference each metric by a short integer alias rather than the full string name, eliminating the largest overhead in repetitive telemetry messages.

Birth and death certificates: the state management model

The birth and death certificate mechanism is Sparkplug B's most important contribution to industrial MQTT deployments. It solves a fundamental problem: in a pub/sub architecture, consumers have no inherent knowledge of what devices exist, what they publish, or whether they are currently connected.

NBIRTH
Edge node comes online
The EoN node publishes NBIRTH immediately after establishing an MQTT session. The NBIRTH payload contains the complete list of every metric the node will publish, with full metadata (names, types, units, initial values, aliases). Every Sparkplug-aware subscriber receives this and builds a complete understanding of the node's capabilities without any prior configuration.
spBv1.0/{group}/NBIRTH/{node}
DBIRTH
Device behind node comes online
After NBIRTH, the EoN node publishes a DBIRTH for each device it manages. Each becomes a discoverable device with its own metric list published at connection time.
spBv1.0/{group}/DBIRTH/{node}/{device}
NDATA / DDATA
Metric value changes (report by exception)
Once born, the node and devices only publish when values change. NDATA carries node-level metric changes; DDATA carries device-level changes. Only the changed metrics are included in each message. Integer aliases replace full metric names for compact encoding.
spBv1.0/{group}/NDATA/{node} | spBv1.0/{group}/DDATA/{node}/{device}
DDEATH
Device behind node goes offline
When the EoN node loses communication with a connected device, it publishes DDEATH for that device. Subscribers know the device is offline and should treat its last known values as stale.
spBv1.0/{group}/DDEATH/{node}/{device}
NDEATH
Edge node goes offline (Last Will and Testament)
The NDEATH message is pre-configured as the MQTT Last Will and Testament when the node connects. If the node disconnects without sending an explicit DISCONNECT, the broker publishes NDEATH automatically. Subscribers instantly know the node and all devices behind it are offline.
spBv1.0/{group}/NDEATH/{node}

The result: a fully self-maintaining namespace. With birth and death certificates, the Sparkplug B namespace is always current. Every subscriber always knows which nodes and devices are online, what metrics they publish, and what the current value of each metric is. No polling, no out-of-band device registry, no manual configuration at the consumer. Add a new device, and the namespace automatically reflects it when the EoN node publishes the DBIRTH. Remove a device, and the DDEATH propagates immediately.

Edge of Network (EoN) nodes: the bridge for legacy devices

Most industrial devices do not speak MQTT natively. PLCs communicate via Modbus, EtherNet/IP, or proprietary vendor protocols. Historians expose OPC HDA. SCADA systems use OPC DA. An EoN node is the Sparkplug B component that bridges these devices into the Sparkplug namespace.

The EoN node connects to its downstream devices using whatever protocol they support: OPC UA client, Modbus TCP master, EtherNet/IP scanner, or any other. It collects the device data, translates it into Sparkplug B metrics with proper types and metadata, and publishes the birth certificate and subsequent data messages on behalf of each device. From the MQTT broker's perspective and from every subscriber's perspective, the device appears as a Sparkplug B entity with full birth certificate discovery and report-by-exception behavior, regardless of the underlying protocol.

This is why edge platforms like N3uron and Cogent DataHub are so important to Sparkplug B deployments in brownfield environments. They serve as EoN nodes for legacy OT infrastructure, translating decades of proprietary OT protocols into Sparkplug B without any changes to the underlying devices.

How Software Toolbox products use Sparkplug B

EoN node
N3uron
N3uron is the primary Sparkplug B EoN node in SWTB's stack. It connects to OT devices and OPC servers using their native protocols, contextualizes raw tag data into named, typed metrics with engineering units, and publishes NBIRTH, NDATA, DBIRTH, DDATA, NDEATH, and DDEATH messages in full Sparkplug B compliance. N3uron also includes its own MQTT broker, so a single N3uron deployment can serve as both the EoN node and the broker for the local Sparkplug B namespace.
Bridge
Cogent DataHub
Cogent DataHub bridges OPC DA, OPC UA, and Modbus data to MQTT brokers, including cloud MQTT endpoints that consume Sparkplug B payloads. DataHub handles the protocol translation from OPC Classic to MQTT and can publish in Sparkplug B format to cloud platforms like AWS IoT Core, Azure IoT Hub, InfluxDB, and AVEVA Insight. It also tunnels MQTT connections securely across firewalls using its outbound-only connection model.
Broker
N3uron built-in broker
N3uron includes a built-in Sparkplug B-aware MQTT broker that handles the full Sparkplug lifecycle management: tracking node and device state, routing birth and death certificates, and managing persistent sessions for EoN nodes. For plants deploying a local Sparkplug B infrastructure without a separate broker product, N3uron's built-in broker provides a complete single-product solution.
Subscribe
OPC Router
OPC Router includes an MQTT client that can subscribe to Sparkplug B topics and route decoded metric data into SQL databases, REST APIs, SAP/ERP systems, and other IT destinations. This handles the downstream consumption side of a Sparkplug B deployment.
AI on UNS
chatUNS.ai
chatUNS.ai subscribes to a Sparkplug B-backed Unified Namespace and uses the birth certificate metadata to understand the namespace without prior configuration. Because every NBIRTH and DBIRTH carries metric names, types, engineering units, and descriptions, chatUNS.ai can discover what data is available across the entire namespace, subscribe to it, and answer natural-language questions about operational data without any manual tag mapping.

Frequently asked questions

Does Sparkplug B require a special broker?+

No. Sparkplug B runs on any standard MQTT 3.1.1 or MQTT 5.0 broker. The broker itself does not need to understand Sparkplug B: it simply routes MQTT messages as normal. Sparkplug B logic (birth/death handling, Protobuf decoding, state tracking) is implemented in the edge nodes (publishers) and the applications (subscribers), not in the broker.

That said, some brokers offer Sparkplug-aware extensions that add broker-level handling for things like STATE message management and namespace persistence. HiveMQ, EMQX, and Ignition's built-in broker fall into this category. N3uron's built-in broker also provides Sparkplug-aware behavior. For simpler deployments, standard Mosquitto or any cloud MQTT service works fine as the transport layer.

What is the Primary Host Application in Sparkplug B?+

The Primary Host Application (PHA) is a Sparkplug B concept for the central application that acts as the main consumer and controller of the Sparkplug namespace: typically a SCADA system, a UNS broker platform, or an enterprise data aggregation platform. The PHA publishes STATE messages to announce its own online/offline status to all EoN nodes in the namespace.

EoN nodes monitor the PHA's STATE. When the PHA is online, nodes operate normally. When the PHA goes offline, EoN nodes can implement configurable behavior: some buffer data for delivery when the PHA comes back online, others switch to local control mode. This bidirectional state awareness is what makes Sparkplug B suitable for mission-critical OT environments where the central application's availability matters to edge devices.

What is metric aliasing and why does it matter?+

Metric aliasing is a Sparkplug B optimization that reduces the size of ongoing data messages after the initial birth certificate. During NBIRTH and DBIRTH, each metric is assigned a unique integer alias alongside its full string name. In subsequent NDATA and DDATA messages, the full metric name is omitted and only the integer alias is used to identify the metric.

For an edge node with 500 tags, each with a descriptive name like "AcmeCorp_Charlotte_PackagingLine2_Filler_Temperature_degC", transmitting that full name with every data message would add significant overhead per metric per update. Replacing it with a short integer (such as 42) can reduce per-metric overhead by 90% or more on high-frequency telemetry. This makes Sparkplug B practical for bandwidth-constrained deployments on cellular and satellite links.

Can Sparkplug B be used for bidirectional communication and device control?+

Yes. Sparkplug B defines two command message types for downward (host-to-device) communication: NCMD for commands to an EoN node, and DCMD for commands to a specific device behind an EoN node. The NCMD and DCMD payloads carry metric write operations using the same Protobuf format as data messages, containing the metric name or alias and the new value to write.

The EoN node receives the NCMD or DCMD from the broker, decodes the Protobuf payload, and translates the write command into the appropriate device-level operation: a Modbus write, an OPC UA write, or whatever the downstream device's protocol requires. This means the bidirectionality of OPC DA and OPC UA is preserved through the Sparkplug B architecture.

How does Sparkplug B handle historical or backfilled data?+

Sparkplug B includes an is_historical flag in the metric payload that marks data points as historical rather than real-time. When an EoN node reconnects after a network outage and needs to deliver buffered historical data, it sets this flag on the backfilled metrics so that subscribers can distinguish backfilled data from current telemetry.

The store-and-forward behavior that generates this backfill is typically implemented in the EoN node itself. N3uron, for example, buffers data locally during network outages and publishes the buffered points with the is_historical flag and original source timestamps when connectivity is restored, ensuring no data gaps in the historian archive even across extended disconnections.

Is Sparkplug B suitable for a Unified Namespace?+

Sparkplug B was designed with UNS architectures in mind and is the most common Sparkplug use case in industrial deployments today. The birth certificate mechanism provides automatic device discovery and self-describing data that the UNS pattern requires. The report-by-exception behavior keeps the namespace efficient even at scale. The standardized topic structure is what makes the namespace browsable and queryable by consumers that have no prior knowledge of the specific devices or tags.

One practical consideration: Sparkplug B's topic namespace (spBv1.0/group/msgtype/node/device) does not directly mirror the ISA-95 hierarchy (Enterprise/Site/Area/Line/Cell) that many UNS implementations use. Platforms like N3uron bridge this by using the group_id and edge_node_id fields to encode the ISA-95 hierarchy, or by translating Sparkplug B topics into plain MQTT topics with an ISA-95 structure for the UNS layer.

Building a Sparkplug B architecture for your plant?

Software Toolbox helps industrial operations deploy N3uron as an EoN node for brownfield OT infrastructure, connecting OPC and legacy devices to Sparkplug B namespaces without replacing what works. Let us help design the right architecture.

Talk to an engineer