Choosing the right IIoT messaging protocol is one of the most consequential decisions in an industrial digitalisation programme. MQTT, OPC-UA, and Sparkplug B each solve different parts of the connectivity problem — and using the wrong one for a given layer of your architecture creates integration debt that compounds over years of deployment.
Protocol Overview
The IIoT protocol landscape is dominated by three standards that serve different architectural roles: MQTT provides lightweight publish-subscribe messaging ideal for device-to-cloud communication; OPC-UA provides rich semantic data modelling and bidirectional communication for shop floor integration; and Sparkplug B (built on MQTT) adds industrial structure and state management to address MQTT's raw limitations in manufacturing contexts.
MQTT: The Connectivity Workhorse
MQTT (Message Queuing Telemetry Transport) is a lightweight publish-subscribe protocol designed for constrained devices and unreliable networks. It operates on a broker model: devices publish messages to topics on a central broker (Mosquitto, EMQX, HiveMQ, or cloud brokers like AWS IoT Core), and subscribers receive all messages matching their topic filters.
MQTT's lack of a semantic layer is its primary limitation for industrial applications. Two devices publishing temperature data on different topics with different payload formats require custom integration code. This is the problem Sparkplug B was designed to solve.
OPC-UA: The Industrial Interoperability Standard
OPC-UA (OPC Unified Architecture) is far more than a messaging protocol — it is a complete platform-independent framework for industrial data exchange with a built-in semantic information model. Unlike MQTT, OPC-UA clients can browse an OPC-UA server's address space and understand the data structure, types, and relationships without prior configuration.
OPC-UA's client-server model makes it ideal for direct device communication: a SCADA system reads a PLC's OPC-UA server to get current values, call methods to control actuators, and subscribe to data changes. OPC-UA Pub/Sub extends this to broker-based messaging over MQTT or AMQP, enabling OPC-UA's semantic richness to be combined with MQTT's broker infrastructure.
Sparkplug B: Industrial MQTT
Sparkplug B (Eclipse Sparkplug) adds four critical capabilities on top of MQTT that address its industrial limitations:
| Sparkplug B Feature | What It Solves | How It Works |
|---|---|---|
| Standardised Topic Namespace | No agreed topic structure in raw MQTT | Mandated format: spBv1.0/GroupID/MessageType/EdgeNodeID/DeviceID |
| Birth/Death Certificates | No device state management in MQTT | NBIRTH/NDEATH/DBIRTH/DDEATH messages track device online/offline state |
| Protobuf Payload Encoding | Opaque payloads in raw MQTT | Standardised Protobuf schema with name, value, datatype, timestamp, quality |
| State Management via SCADA Host | No system-level state in MQTT | Primary SCADA host publishes STATE messages; edge nodes resubmit data on host reconnect |
Sparkplug B essentially makes MQTT behave like a well-structured industrial protocol while retaining MQTT's broker infrastructure, scalability, and ecosystem. Any Sparkplug-compliant device can be understood by any Sparkplug-compliant system without custom integration — comparable to OPC-UA's semantic model benefit, but using MQTT brokers rather than OPC-UA servers.
Protocol Comparison Matrix
| Dimension | MQTT | OPC-UA (Client-Server) | Sparkplug B |
|---|---|---|---|
| Protocol Type | Publish-Subscribe | Client-Server + Pub/Sub | Publish-Subscribe (MQTT-based) |
| Transport | TCP/IP | TCP/IP, HTTPS | TCP/IP (via MQTT broker) |
| Semantic Data Model | None | Rich (OPC-UA information model) | Moderate (typed, named metrics) |
| Bidirectional Commands | Via topic subscription | Native method calls, write operations | NCMD/DCMD messages |
| Device State Management | Basic (LWT only) | Session-based | Birth/Death certificates + STATE |
| Data Types | None (opaque bytes) | Rich (70+ built-in types) | Typed metrics (Protobuf) |
| Scalability | Very high (millions of devices) | Moderate (session-based connections) | High (broker-based) |
| Best Layer | Device → Cloud at scale | PLC/SCADA integration | Edge → SCADA/MES |
Recommended Architecture Pattern
The most effective IIoT architectures use all three protocols at different layers, with each playing to its strengths: