MQTT Sparkplug B

MQTT Sparkplug B is an open industrial specification on top of MQTT that defines standardised data models, device state management and OT interoperability for Industrial Automation and Industrial Internet of Things environments.

The specification solves an important issue with standard MQTT: MQTT defines transport but not how industrial data should be structured, interpreted or managed. Sparkplug B therefore adds standardised OT semantics for devices, processes, metrics, events and system status.

Within modern IT OT Convergence architectures, Sparkplug B is widely applied in:

The standard is maintained by the Eclipse Foundation as part of the Eclipse Tahu project.


⚙️ Why Sparkplug B exists

Standard MQTT provides:

  • publish/subscribe messaging
  • lightweight communication
  • broker-based Architecture
  • scalability

But standard MQTT does not define:

  • data payloads
  • device states
  • birth/death detection
  • datatype consistency
  • namespace structure
  • OT semantics

This causes problems:

Issue Consequence
Vendor-specific payloads No interoperability
No state awareness Unclear device status
No datatype standard Integration complexity
No lifecycle management Difficult troubleshooting
Arbitrary topic structures Poor scalability

Sparkplug B solves these OT problems by defining a uniform industrial data structure.


🏗️ Architecture of Sparkplug B

A Sparkplug architecture typically consists of:

Field Devices
     │
     ▼
Edge Node / Gateway
     │
     ▼
MQTT Broker
 ┌───┼─────────┐
 ▼   ▼         ▼
SCADA MES  Historian

Important components:

Component Function
Edge Node Collects OT data
MQTT Broker Central message broker
Primary Application Central OT application
Host Application Data consumer
Sparkplug Client Publisher/subscriber

The architecture is fully event-driven.


📡 MQTT as foundation layer

Sparkplug B uses standard MQTT as a transport mechanism.

Important MQTT concepts:

MQTT Concept Function
Topic Data channel
Broker Message router
Publisher Data source
Subscriber Data consumer
QoS Reliability
Retained Messages Preserve last status
Last Will and Testament Offline detection

Sparkplug B extends these mechanisms with OT functionality.


🧠 Key Sparkplug concepts

State Awareness

A core element of Sparkplug B is awareness of device states.

Important states:

  • online
  • offline
  • reconnecting
  • rebirth
  • stale data

This allows OT systems to know directly:

  • which devices are active
  • which data is reliable
  • when connections fail
  • when devices restart

This is essential within Industrial Processes.


🔄 Birth and Death Certificates

Sparkplug uses special messages:

Message Function
NBIRTH Node online
DBIRTH Device online
NDEATH Node offline
DDEATH Device offline

At startup, a node automatically publishes its full data structure.

Benefits:

  • automatic discovery
  • dynamic configuration
  • real-time inventory
  • automatic Recovery
  • consistent state synchronisation

This removes the need for complex polling mechanisms.


🧩 Topic Namespace structure

Sparkplug B defines a strict topic structure.

Structure:

spBv1.0/group_id/message_type/edge_node/device_id

Example:

spBv1.0/factory1/DDATA/line1/plc01

Important message types:

Type Meaning
NBIRTH Node birth
DBIRTH Device birth
NDATA Node data
DDATA Device data
NCMD Node command
DCMD Device command
NDEATH Node death

The consistent namespace is crucial within Unified Namespace architectures.


📦 Payload structure

Sparkplug uses Protocol Buffers (Protobuf) for efficient binary serialisation.

Benefits:

  • compact payloads
  • low bandwidth
  • high performance
  • datatype consistency
  • platform independence

Typical metrics contain:

Field Function
Name Metric name
Datatype Type definition
Value Process value
Timestamp Timestamp
Quality Data quality

Supported datatypes:

  • integers
  • floats
  • booleans
  • strings
  • datasets
  • templates
  • arrays

⚡ Real-time OT data

Sparkplug B is designed for near real-time OT communication.

Applications:

The event-driven architecture reduces:

  • polling traffic
  • network load
  • Latency
  • CPU usage

Compared to classic polling protocols such as Modbus or SNMP, a more efficient data structure emerges.


🔌 Integration with industrial systems

Sparkplug B is often used as an integration layer between OT systems.

Typical couplings

System Role
PLC Data source
SCADA Supervision
MES Production data
Historian Time-series storage
ERP Business integration
Edge Device Local processing

Many edge gateways translate legacy OT protocols into Sparkplug.

Examples:

Legacy protocol Sparkplug gateway
Modbus TCP MQTT publisher
S7 Comm Edge node
BACnet Sparkplug bridge
OPC UA Namespace mapping

☁️ Unified Namespace and Sparkplug

Sparkplug B is closely linked to the concept of a Unified Namespace.

Within a Unified Namespace, MQTT functions as a central real-time data bus.

Sparkplug provides:

This creates a single real-time OT information layer for:

  • production
  • logistics
  • energy
  • quality systems
  • maintenance
  • analytics

🔒 Cybersecurity aspects

Although Sparkplug adds structure, Security still depends on the MQTT architecture.

Important risks

Risk Impact
Insecure brokers Data manipulation
Credential theft Unauthorised access
Rogue publishers False OT data
Topic spoofing Process disruption
Replay attacks Faulty process status
Broker compromise Central OT outage

Mitigating Measures

Important OT security measures:

Within critical OT networks, broker Hardening is essential.


🏭 Practical applications

Manufacturing

Use for:

  • OEE monitoring
  • machine states
  • production events
  • batch tracking
  • quality metrics

Energy supply

Applications:

  • smart grids
  • substations
  • energy metering
  • load balancing

Building Automation

Use within:

  • HVAC
  • energy management
  • smart buildings
  • occupancy analytics

Water and process industry

Applications:

  • remote Telemetry
  • pumping stations
  • tank monitoring
  • alarm forwarding

⚠️ Operational considerations

Broker as single point of failure

The MQTT broker is crucial.

Failure CAN lead to:

  • loss of real-time data
  • state inconsistencies
  • loss of command messaging
  • stale data

The following are therefore often used:


📉 Performance considerations

Benefits

Property Result
Event-driven Less polling
Protobuf payloads Low overhead
Publish/subscribe High scalability
Broker routing Efficient distribution

Possible bottlenecks

  • broker saturation
  • topic explosion
  • retained message overload
  • poor namespace design
  • insufficient QoS tuning

In large industrial environments, hundreds of thousands of metrics per second can be processed.


🧪 Sparkplug and Edge Computing

Within Edge Computing, Sparkplug is often used for:

  • protocol conversion
  • local filtering
  • buffering
  • edge analytics
  • AI inferencing
  • store-and-forward

An edge node often functions as:

PLC → Edge Gateway → Sparkplug → MQTT Broker

This couples legacy OT systems to modern data architectures.


🛡️ Comparison with OPC UA

Sparkplug and OPC UA are often compared.

Property Sparkplug B OPC UA
Architecture Publish/subscribe Client/server + PubSub
Overhead Low Higher
Data model Simple Very extensive
Discovery Birth/Death OPC discovery
Real-time scalability High Good
Complexity Lower Higher
Legacy integration Gateway-based Broadly supported
WAN suitability Very good Good

In practice, both are often combined.


Important developments:

  • Unified Namespace
  • cloud-native OT
  • edge-native architectures
  • broker clustering
  • OT data fabrics
  • real-time analytics
  • Industrial AI
  • event-driven manufacturing

Sparkplug B is growing strongly within modern software-defined OT architectures.


🎯 Conclusion

MQTT Sparkplug B is an important standard for modern industrial data integration within Industrial Internet of Things and IT OT Convergence environments.

By extending MQTT with OT semantics, state awareness and standardised payloads, a scalable and interoperable architecture for real-time industrial communication emerges.

Sparkplug B therefore plays a central role within modern Unified Namespace, edge computing and event-driven OT architectures where real-time data sharing, flexibility and interoperability are essential.