Back to Glossary
Communication Protocols

MQTT (Message Queuing Telemetry Transport)

MQTT is a lightweight publish-subscribe messaging protocol designed for constrained devices and low-bandwidth networks. It has become the dominant protocol for IoT and IIoT data transport in industrial automation.

MQTTProtocolIoTPublish-SubscribeSparkplug B

What Is MQTT?

MQTT (Message Queuing Telemetry Transport) is a lightweight, publish-subscribe messaging protocol designed for machine-to-machine (M2M) communication and Internet of Things (IoT) applications. Originally developed by IBM in 1999 for monitoring oil pipelines over satellite links, MQTT has become the protocol of choice for Industrial IoT (IIoT) due to its efficiency, reliability, and simplicity.

MQTT operates on top of TCP/IP and is designed to minimize network bandwidth and device resource requirements, making it ideal for constrained environments where devices have limited processing power, memory, or connectivity.


How MQTT Works: The Publish-Subscribe Model

Unlike traditional request-response protocols, MQTT uses a publish-subscribe (pub/sub) pattern with three core components:

  • Publisher -- a client that sends messages to a specific topic
  • Subscriber -- a client that registers interest in one or more topics
  • Broker -- a central server that receives all messages from publishers and routes them to the appropriate subscribers

Topics

MQTT topics are hierarchical strings that organize messages, similar to file paths:

  • `factory/line1/plc1/temperature`
  • `site/building-a/hvac/status`
  • `enterprise/plant-paris/energy/consumption`

Subscribers can use wildcards to receive messages from multiple topics:

  • `+` (single level): `factory/+/plc1/temperature` matches any line
  • `#` (multi level): `factory/#` matches all topics under factory


Quality of Service (QoS) Levels

MQTT provides three levels of message delivery guarantee:

  • QoS 0 (At most once) -- fire and forget; the message is delivered at most once with no confirmation. Best for non-critical telemetry data where occasional loss is acceptable.
  • QoS 1 (At least once) -- the message is guaranteed to arrive but may be delivered multiple times. Suitable for most industrial monitoring scenarios.
  • QoS 2 (Exactly once) -- the highest level of guarantee, ensuring the message is delivered exactly once through a four-step handshake. Used for critical commands or financial transactions.


MQTT in Industrial Automation

MQTT has gained massive adoption in industrial settings for several reasons:

  • Lightweight -- minimal overhead makes it suitable for edge devices and PLCs
  • Decoupled architecture -- publishers and subscribers do not need to know about each other
  • Scalability -- a single broker can handle thousands of concurrent connections
  • Resilience -- supports persistent sessions, last will and testament (LWT), and retained messages
  • Low bandwidth -- minimal packet size reduces network usage in remote or cellular-connected sites


Sparkplug B: MQTT for Industry

While MQTT defines the transport layer, it does not specify how industrial data should be structured. Sparkplug B (now managed by the Eclipse Foundation) fills this gap by defining:

  • A standardized topic namespace -- `spBv1.0/{group_id}/{message_type}/{edge_node_id}/{device_id}`
  • Payload encoding -- using Protocol Buffers (protobuf) for efficient binary serialization
  • State management -- birth/death certificates to track device connectivity
  • Metric definitions -- standardized data types, timestamps, and metadata
  • Store and forward -- ensuring data is not lost during network outages

Sparkplug B transforms MQTT from a generic messaging protocol into a complete industrial data infrastructure solution.


MQTT vs OPC UA

| Feature | MQTT | OPC UA |

|---|---|---|

| Pattern | Publish-subscribe | Client-server (+ pub-sub) |

| Weight | Very lightweight | Heavier, more complex |

| Data modeling | None (without Sparkplug) | Rich information model |

| Security | TLS + username/password | TLS + certificates + roles |

| Best for | IoT telemetry, edge-to-cloud | Device-to-server, enterprise |

| Scalability | Excellent for many devices | Good for deep integration |

In modern architectures, MQTT and OPC UA are often complementary rather than competing: OPC UA connects to devices and controllers on the plant floor, while MQTT transports that data to cloud platforms and enterprise systems.


MQTT in Ignition

Ignition's MQTT capabilities are provided through the Cirrus Link MQTT modules:

  • MQTT Engine -- subscribes to MQTT topics and automatically creates Ignition tags from incoming Sparkplug B data
  • MQTT Transmission -- publishes Ignition tag data to an MQTT broker using Sparkplug B
  • MQTT Distributor -- an embedded MQTT broker that runs inside Ignition, eliminating the need for an external broker

These modules make Ignition a powerful hub for MQTT-based IIoT architectures, enabling seamless integration between edge devices, SCADA systems, and cloud platforms.


Key Takeaways

  • MQTT is a lightweight pub/sub protocol ideal for IoT and IIoT applications
  • Its three QoS levels provide flexible delivery guarantees
  • Sparkplug B adds industrial-grade data structure and state management on top of MQTT
  • MQTT and OPC UA are complementary protocols in modern industrial architectures
  • Ignition's Cirrus Link modules provide comprehensive MQTT and Sparkplug B support

Need Expert Guidance?

Our team of certified Ignition integrators can help you implement the right technologies for your industrial automation needs.