Skip to main content
INDUSTRIAL PROTOCOLS · IIOT

What Is Sparkplug B?

Sparkplug B is an open specification that defines how industrial devices and applications use MQTT. It fixes the topic structure, encodes data as typed, time-stamped metrics using Protocol Buffers, and adds birth and death messages so a SCADA or IIoT host always knows which devices are online and whether their data is current.

01

What Sparkplug B adds to MQTT

Sparkplug B is an open specification for using MQTT in industrial systems. MQTT is a lightweight publish/subscribe protocol: devices publish messages to topics on a broker, and any application that subscribes receives them. MQTT deliberately says nothing about what the topics should be called or what the messages contain, so two vendors’ devices can both use MQTT and still be unable to understand each other.

Sparkplug fills that gap. It was created in 2016 for SCADA over MQTT, passed to the Eclipse Foundation, and published as Sparkplug 3.0 in 2022, which has since become the international standard ISO/IEC 20237. The “B” refers to the payload format in use today; the earlier “A” format is obsolete.

  • //
    A fixed topic namespace. Every topic follows spBv1.0/group_id/message_type/edge_node_id/device_id, so a host knows where to find each device’s data.
  • //
    Typed, compact payloads. Values are sent as metrics with a name, data type, time stamp and quality, encoded with Google Protocol Buffers to keep messages small.
  • //
    State awareness. Each edge node announces itself with a birth certificate and registers a death certificate with the broker, so its data is marked stale the moment it drops off.
  • //
    Report by exception. After the birth message, nodes send only values that have changed, which keeps traffic low on cellular and radio links.
02

Plain MQTT vs Sparkplug B

Sparkplug B is MQTT, not a replacement for it: the same brokers carry both. The difference is in the rules each side follows.

Feature Plain MQTT MQTT with Sparkplug B
Topic structure Any, chosen per project Fixed: spBv1.0/group/message type/edge node/device
Payload Any bytes, often JSON Protocol Buffers with named, typed, time-stamped metrics
Device online state Optional, by convention Required birth and death certificates
Discovery Subscriber must know the topics Host learns every metric from birth messages
Commands Project-specific Defined command messages for nodes and devices
Flexibility High; any client can read any topic Lower; clients must decode Sparkplug payloads

The roles are fixed too. An edge node, usually a gateway or PLC, collects data from devices and publishes it; a primary host application, typically SCADA or an IIoT data platform, consumes it and can send commands back. Our OPC UA vs MQTT white paper covers the Sparkplug message types, the unified namespace and gateway architectures in more detail.

03

Where Sparkplug B is used

Sparkplug B is most common where many sites or machines report to one SCADA or data platform: oil and gas wells, water networks, utilities and multi-line factories building a unified namespace. The edge node is often a small industrial computer that polls Modbus or OPC UA devices locally and publishes the results as Sparkplug metrics. Our industrial IoT gateways suit that role, with serial and Ethernet ports for the devices and wired or cellular links to the broker.

04

Quick answers on Sparkplug B

Sparkplug B: common questions

Is Sparkplug B a protocol?

It is a specification on top of a protocol. MQTT is the protocol; Sparkplug B defines the topics, payloads and state rules that industrial devices follow when they use it.

Is Sparkplug B open source?

The specification is open and free to use. It is published by the Eclipse Foundation, which also hosts open-source reference libraries, and commercial brokers, SCADA packages and gateways implement it.

Does Sparkplug B need a special broker?

No. Any standard MQTT broker can carry Sparkplug traffic. Some brokers add Sparkplug-aware features, such as decoding payloads or keeping the latest birth messages for new subscribers.

Does Sparkplug B replace OPC UA?

No, they are often used together. OPC UA models machines in rich detail and serves clients on the plant network, while Sparkplug B moves data efficiently from many edge nodes to a central host. A gateway frequently reads OPC UA and publishes Sparkplug.

We supply IIoT gateways and edge computers with the operating system, protocol drivers and your MQTT or Sparkplug client software installed as standard, ready to connect to your broker.