Connect · Sparkplug B
MQTT Sparkplug B on One Industrial IoT Platform
Sparkplug B is the open Eclipse specification that turns plain MQTT into a self-describing, state-aware protocol for the industrial internet of things. Kilo speaks it natively, as a Sparkplug Host Application and as an Edge Node, on MQTT 3.1.1 and 5.0, tested against the official Sparkplug TCK 3.0.0.
Sparkplug B · basics
What Is MQTT Sparkplug B?
MQTT moves messages through a broker but leaves three questions open: what a topic means, what a payload contains, and whether the sender is still alive. Sparkplug B, the open Eclipse specification for the industrial internet of things, answers all three.
One topic namespace
Every message lives under spBv1.0/group/type/edge-node/device, so any host knows where a value came from without a vendor manual.
Protocol Buffers payload
The "B" is the encoding: a compact protobuf schema from Eclipse Tahu where every metric carries a name or alias, datatype, timestamp and value.
Session-state rules
Birth and death certificates, sequence numbers and Rebirth requests tell every host what is online, so stale data is never shown as live.
Sparkplug B · comparison
Sparkplug B vs MQTT: What Does Sparkplug Add?
Sparkplug B is not a replacement for MQTT: it runs on any MQTT 3.1.1 or 5.0 broker and adds the agreement that plain MQTT leaves to each vendor.
Sparkplug B · topics
How Does the Sparkplug B Topic Namespace Work?
Every Sparkplug topic has the same five parts. The message type in the middle says what the message is; a Host Application announces itself on spBv1.0/STATE/host_id.
An Edge Node comes online and lists all its metrics.
A device behind the node comes online with its metrics.
Changed values only, report by exception.
A node or device goes offline; its data turns stale.
Commands from a host back to a node or device.
A Primary Host Application announces it is online.
Sparkplug B · session state
How Do Sparkplug Birth and Death Certificates Work?
Birth certificates describe everything a node will send; death certificates, delivered by the broker as the MQTT Will, mark it offline the moment the connection drops.
- CONNECT
NDEATH registered as Will
The Edge Node connects with its death certificate as the MQTT Will, carrying a bdSeq number.
- NBIRTH
Node birth certificate
Every node metric with its datatype and current value, the same bdSeq, and seq 0.
- DBIRTH
Device births
One per device behind the node, so a host knows every metric before any data arrives.
- DATA
Changes only
NDATA and DDATA carry changed values; seq runs 0 to 255 so a host spots any gap.
- NDEATH
Death or Rebirth
If the link drops, the broker publishes the NDEATH. On a gap, a host sends Rebirth.
Sparkplug B · roles
What Is a Sparkplug Edge Node and Host Application?
An Edge Node owns the MQTT session at the edge; a Host Application consumes the data. Kilo plays both roles, over the broker you choose.
Gateway, PLC or edge software
- Publishes births, data and deaths
- Executes NCMD and DCMD
- Waits for the primary host if configured
Any MQTT 3.1.1 or 5.0 broker
- Routes spBv1.0 topics
- Delivers the NDEATH Will
- Keeps the retained STATE
Kilo IIoT platform
- Publishes STATE as Primary Host
- Tracks bdSeq, seq and Rebirth
- Turns metrics into devices, rules and alarms
Sparkplug B · architecture
How Do You Build a Unified Namespace with MQTT Sparkplug?
A unified namespace (UNS) is an IIoT architecture where every system publishes its current state into one shared hierarchy, usually an MQTT broker, instead of point-to-point integrations.
- Map the plant hierarchy onto Sparkplug IDs: the group for a site or area, the Edge Node for a line or cell, the device for a machine.
- Birth certificates make every node self-describing, so new equipment appears in the namespace without manual mapping.
- Death certificates keep the namespace truthful: the moment a node dies, every value it owns is marked stale.
- Kilo consumes the same namespace, so dashboards, rules and alarms see the plant exactly as it is published.
Sparkplug B · comparison
OPC UA vs MQTT Sparkplug B
They are complementary rather than rivals: a common IIoT architecture reads equipment over OPC UA at the edge and publishes it as Sparkplug B to the broker that feeds the unified namespace.
Sparkplug B · brokers
Which MQTT Broker Works with Sparkplug B?
Any broker that implements MQTT correctly can carry Sparkplug B. Kilo works with the broker you already run, over mqtt:// or mqtts://, or with a managed Cloud MQTT endpoint.
Sparkplug Compliant broker
Any MQTT 3.1.1 or 5.0 broker with QoS 0 and 1, retained messages and the Will. That is all Edge Nodes and hosts need.
Sparkplug Aware broker
Additionally stores the latest birth certificates for late joiners. Useful, but neither hosts nor Edge Nodes depend on it.
Your broker or Cloud MQTT
Point Kilo at the broker your Edge Nodes already use, or let the platform provision a managed endpoint with its own credentials.
Sparkplug B · example
MQTT Sparkplug B Example
A filling line at one site, from the first birth certificate to a lost connection, as the messages appear on the broker.
- The Edge Node line-3 registers its NDEATH as the Will, then publishes its NBIRTH and a DBIRTH for the filler.
- From then on only changes travel: one DDATA per change, each with the next seq number.
- Commands go back down the same tree as a DCMD.
- If the gateway loses power, the broker publishes the NDEATH and every host marks line-3 and the filler offline.
Sparkplug B · conformance
What Is the Eclipse Sparkplug TCK?
The Technology Compatibility Kit is the Eclipse Foundation’s official test suite for the specification. Kilo’s Sparkplug B implementation passes the signed TCK 3.0.0 for the Edge Node and Host Application profiles, on MQTT 5.0 and 3.1.1, and every result is public.
- 28/28
- TCK test runs passed
- 273
- Requirements passed
- 2
- Profiles tested
- 6/6
- Optional groups passed
Connect · Sparkplug B
How Do I Connect Sparkplug B Devices to an IoT Platform?
Point Kilo at your broker
Add a Sparkplug B connector to the broker your Edge Nodes already use, or to a Cloud MQTT endpoint, and choose the groups to subscribe to.
Births become devices
Every NBIRTH and DBIRTH registers its node or device with every metric, datatype and unit, so no payload mapping is needed.
Data, deaths and commands
Changes stream into dashboards, rules and alarms; deaths mark values stale at once; commands go back as NCMD and DCMD.
Connect · Sparkplug B
What Should an IIoT Platform Support for Sparkplug B?
- Sparkplug 3.0.0
- Edge Node and Host Application profiles, on MQTT 3.1.1 and MQTT 5.0, tested with the official Sparkplug TCK 3.0.0.
- Full session state
- bdSeq and seq tracking, Will-delivered deaths, Rebirth requests on any gap, and stale marking the moment a node or device dies.
- Primary Host STATE
- A retained STATE birth and a STATE death Will, so Edge Nodes that wait for the primary host know when Kilo is listening.
- Message reordering
- Out-of-order messages are held and reordered within a timeout before a Rebirth is requested, so a brief broker hiccup is not data loss.
- Every data type
- All Sparkplug B scalar and array types, datasets, templates, properties and metric aliases, decoded against what each birth declared.
- Commands both ways
- NCMD and DCMD writes to node and device metrics, including Node Control/Rebirth, from dashboards, rules or the API.
Connect · Sparkplug B
What Can You Do with Sparkplug B Data?
Connect · Sparkplug B
Sparkplug B FAQ
Is Sparkplug B the same as MQTT?
No. MQTT is the transport; Sparkplug B is a specification on top of it that fixes the topic namespace, the Protocol Buffers payload and the session-state rules. Every Sparkplug B message is an MQTT message, but most MQTT traffic is not Sparkplug.
Which MQTT versions does Sparkplug B support?
Sparkplug 3.0.0 runs on MQTT 3.1.1 and MQTT 5.0. Kilo supports both, and was tested on both with the official TCK.
Do I need a special broker for Sparkplug B?
No. Any MQTT 3.1.1 or 5.0 broker that handles QoS 1, retained messages and the Will correctly works. A Sparkplug Aware broker is optional.
Is Sparkplug B open source?
The specification is an open Eclipse Foundation standard under the Eclipse Public License, and the payload schema is published in Eclipse Tahu. Products implement it independently; Kilo’s implementation is its own.
What is the difference between IIoT and IoT?
IIoT, the industrial internet of things, is IoT applied to plants, utilities and infrastructure, where data comes from PLCs, meters and machines and must be reliable, timestamped and state-aware. That reliability is exactly what Sparkplug B adds to MQTT.
Can I still use JSON over MQTT?
Yes. Kilo’s MQTT connector keeps parsing JSON payloads, so Sparkplug B devices and plain MQTT devices can live side by side in one organization.
Connect · Sparkplug B
More ways to connect industrial equipment
Connect Sparkplug B Devices to Kilo
Start free and point Kilo at your broker, or book a call and we’ll map your Sparkplug groups, Edge Nodes and devices together.