MQTT (Message Queuing Telemetry Transport) has become the de facto protocol for Industrial IoT data collection. Originally designed for satellite monitoring of oil pipelines in the 1990s by Andy Stanford-Clark and Arlen Nipper, it is now the backbone of IIoT platforms from Ignition Edge to AWS IoT Core to Azure IoT Hub. This deep-dive explains how MQTT works, why it suits industrial applications, and how to implement it correctly in an OT environment.
Why MQTT Fits IIoT
MQTT’s design choices align perfectly with industrial field conditions:
- Lightweight protocol overhead: The minimum MQTT packet size is 2 bytes. For a plant with 10,000 tags reporting every second, the difference between MQTT and REST API bandwidth consumption is substantial — often 10-20x less with MQTT.
- Publish-subscribe model: Unlike polling-based protocols (Modbus TCP, OPC DA), MQTT uses a publish-subscribe architecture. Field devices or edge nodes publish data to a broker; any number of subscribers can receive that data without the publisher knowing who is listening. This decouples production (OT systems) from consumption (cloud, historian, analytics).
- Report-by-exception: MQTT clients can be configured to publish only when a value changes (deadband-based publishing), dramatically reducing network traffic and storage overhead. A transmitter that changes once per hour only publishes once per hour, not 3,600 times.
- Persistent sessions: The broker can store messages for offline clients. When a subscriber reconnects, it receives any messages published during its absence. This is critical for mobile devices and unreliable wireless connections.
- Last Will and Testament (LWT): A client registers an LWT message with the broker on connection. If the client disconnects unexpectedly, the broker publishes the LWT message on the client’s behalf. In an OT context, this allows automatic “device offline” notifications without a heartbeat polling mechanism.
MQTT Architecture: Broker, Publisher, Subscriber
An MQTT deployment has three roles:
- Broker: The message routing server. All MQTT communication passes through the broker. The broker receives published messages and routes them to subscribed clients. Common industrial brokers include HiveMQ, Mosquitto (open source), EMQX, and VerneMQ. Cloud services (AWS IoT, Azure IoT Hub, Google Cloud IoT) embed a managed broker.
- Publisher: Any device or application that sends data to the broker by publishing to a topic. In an OT context, publishers are typically edge devices (Ignition Edge, Kepware, a PLC with MQTT client support, or a custom gateway).
- Subscriber: Any device or application that receives data by subscribing to a topic. Subscribers can be SCADA systems, historians, cloud analytics platforms, or dashboards.
MQTT Topics
Topics are hierarchical strings that identify the data being published, similar to a file path. Example: plant/refinery1/unit3/pressure_inlet. Topics use forward slashes as separators. Subscribers can use wildcard characters:
+(single level wildcard):plant/+/unit3/pressure_inletmatches all refineries’ Unit 3 inlet pressure#(multi-level wildcard):plant/refinery1/#matches all topics under refinery1
Topic design matters for performance and security. A flat topic namespace (everything under one root) creates subscription management headaches and makes access control difficult. A well-designed hierarchy mirrors the physical plant structure (plant/area/unit/tag) and enables fine-grained security policies.
MQTT Sparkplug B: The Industrial Extension
Base MQTT is payload-agnostic — the broker does not interpret the message content. This flexibility is a problem in industrial applications: without a standard payload format, every publisher uses a different JSON structure, making integration painful.
Sparkplug B, developed by Cirrus Link Solutions and now an Eclipse Foundation standard, defines an MQTT topic namespace and payload format specifically for industrial systems. Key features:
- Defined topic namespace: spBv1.0/[group_id]/[message_type]/[edge_node_id]/[device_id]. All Sparkplug publishers use this structure, enabling any Sparkplug-aware subscriber to parse data without custom mapping.
- Birth certificates: When an edge node connects, it publishes an NBIRTH (node birth) and DBIRTH (device birth) message describing all available metrics (tags), their data types, and engineering units. Subscribers receive a complete tag inventory automatically.
- Death certificates: When an edge node disconnects, an NDEATH message is automatically published (using MQTT LWT), setting all device tags to stale/offline state in subscribers.
- State management: Sparkplug tracks which tags have changed and only publishes changes, implementing report-by-exception at the protocol level.
- Protobuf encoding: Sparkplug uses Protocol Buffers (protobuf) for message encoding, which is more compact and faster to parse than JSON.
Security Considerations
Base MQTT over port 1883 is unencrypted and unauthenticated. For any industrial deployment that crosses a network boundary or involves sensitive data:
- Use MQTT over TLS (port 8883). TLS provides encryption and server authentication.
- Enable broker-level username/password authentication at minimum. X.509 client certificate authentication is preferred for OT devices.
- Implement topic-based access control lists (ACLs) on the broker. A field device should only be able to publish to its own topic namespace — not subscribe to other devices or publish to admin topics.
- Run the MQTT broker in the DMZ or a dedicated IIoT network segment. It should not be placed directly on the process control network.
MQTT in Ignition by Inductive Automation
Ignition is the most common platform for MQTT implementation in industrial environments. The Ignition MQTT Engine module (developed by Cirrus Link) acts as an MQTT subscriber, consuming Sparkplug B data from edge nodes and making it available as Ignition tags. The Ignition MQTT Transmission module acts as an MQTT publisher, forwarding Ignition tag data to a broker.
This architecture is common in large facilities: PLCs connect to Ignition Edge nodes via OPC UA or Modbus TCP; Edge nodes publish Sparkplug B data via MQTT to a broker; the central Ignition server subscribes to all plant data through the broker. The broker acts as a data buffer, so a brief Ignition server restart does not cause loss of field data.
Choosing Between MQTT and OPC UA
MQTT and OPC UA are complementary, not competing. MQTT (especially Sparkplug B) is optimised for efficient, scalable data transport from many edge devices to a centralised broker. OPC UA is optimised for rich semantics, browseable information models, and secure direct connections. In modern industrial architectures, OPC UA handles local controller-to-SCADA communication while MQTT handles cloud uplift and multi-site aggregation. The OPC UA over MQTT (Pub/Sub) specification combines both, but adoption is still early.
