MQTT (Message Queuing Telemetry Transport)
Definition: MQTT (Message Queuing Telemetry Transport) is a lightweight, publish-subscribe network protocol designed for transmitting small packets of data between devices over low-bandwidth or unreliable networks. It is the dominant communication standard for IoT sensor networks and is widely used in industrial condition monitoring, remote equipment monitoring, and predictive maintenance systems.
Key Takeaways
- MQTT uses a publish-subscribe model rather than a request-response model, which makes it far more efficient than HTTP for sensor data streams.
- A central server called a broker routes all messages between publishing devices and subscribing applications.
- Three Quality of Service (QoS) levels allow teams to balance delivery speed against reliability depending on how critical the data is.
- MQTT runs over standard TCP/IP networks and can operate entirely on a local plant network without internet access.
- It is the most common protocol used to transmit data from industrial IoT sensors to maintenance and monitoring platforms.
- Security is optional by default but the protocol fully supports TLS encryption and client authentication for industrial deployments.
What Is MQTT?
MQTT was originally developed by IBM in the late 1990s to monitor oil pipelines via satellite, where bandwidth was scarce and connections were unreliable. The protocol was later standardized by OASIS and became the backbone of modern Industrial Internet of Things (IIoT) deployments. Unlike traditional web protocols that require a device to repeatedly ask a server for updates, MQTT allows devices to send data the moment it is generated and have that data instantly distributed to every system that needs it.
For maintenance and operations teams, MQTT is most relevant as the communication layer that connects physical sensors on equipment to monitoring dashboards, CMMS platforms, and analytics systems. Understanding how MQTT works helps maintenance managers evaluate sensor network architectures, diagnose data gaps, and make informed decisions about remote equipment monitoring infrastructure.
How MQTT Works: The Publish-Subscribe Model
MQTT is built around three roles: publishers, subscribers, and a broker.
A publisher is any device that generates data, such as a
vibration sensor on a motor or a temperature sensor on a compressor. The
publisher sends its data to the broker along with a topic label, for example
plant/line-3/motor-7/temperature.
The broker is a server that receives all incoming messages and routes them based on topic subscriptions. It decouples publishers from subscribers entirely: a sensor does not need to know which systems are consuming its data.
A subscriber is any application that has registered interest in a topic. When a new message arrives on that topic, the broker immediately pushes the message to every active subscriber. A condition monitoring platform, a maintenance dashboard, and a historian can all receive the same sensor reading simultaneously without the sensor needing to know any of them exist.
This architecture makes MQTT extremely scalable. Adding a new consuming system requires no changes to sensors or the broker, only a new subscription. Removing a system equally requires no changes to devices in the field.
MQTT Topics and Topic Hierarchies
Topics in MQTT are strings that use a forward-slash separator to create a hierarchy, similar to a file path. A well-structured topic hierarchy mirrors the physical layout of a facility.
| Topic Pattern | Example | What It Represents |
|---|---|---|
| Specific sensor reading |
plant/line-3/pump-2/vibration
|
Vibration data from one pump on one line |
| All sensors on a machine |
plant/line-3/pump-2/#
|
All data from pump-2 (using wildcard) |
| All temperature sensors in plant |
plant/+/+/temperature
|
Temperature from every asset on every line |
| All data from all assets |
plant/#
|
Every message published to the plant namespace |
A consistent topic naming convention is one of the most important decisions in any MQTT deployment. It determines how easily new systems can subscribe to relevant subsets of data and how maintainable the network is over time. Many industrial teams align their MQTT topic hierarchy with their asset hierarchy so data is traceable back to specific equipment records.
MQTT Quality of Service (QoS) Levels Explained
Not all sensor data carries the same consequence if a message is lost. MQTT addresses this with three Quality of Service levels.
| QoS Level | Name | Delivery Guarantee | Best Use |
|---|---|---|---|
| QoS 0 | At most once | No acknowledgment. Message may be lost. | High-frequency ambient readings where occasional loss is acceptable |
| QoS 1 | At least once | Acknowledgment required. Duplicates possible. | Most condition monitoring scenarios; fault alerts and threshold breaches |
| QoS 2 | Exactly once | Four-step handshake. No duplicates, no loss. | Critical safety events, regulatory data logging, work order triggers |
For predictive maintenance applications, QoS 1 is the most common choice. It ensures that threshold breach alerts and anomaly detection events reach the monitoring platform even if the network drops briefly, without the latency penalty of QoS 2.
MQTT Retained Messages and Last Will
Two MQTT features are especially useful for industrial monitoring: retained messages and Last Will and Testament (LWT).
A retained message is a message flagged to be stored by the broker. When a new subscriber connects and requests a topic, the broker immediately delivers the most recent retained message, so the subscriber always has a known starting value rather than waiting for the next publish cycle. This is useful for status topics that update infrequently, such as a machine's operational state.
The Last Will and Testament feature allows a device to pre-register a message with the broker at connection time. If the device disconnects unexpectedly without sending a proper disconnect notification, the broker automatically publishes the LWT message on the device's behalf. For maintenance teams, this enables immediate alerting when a sensor or gateway loses power or network connectivity, rather than relying on timeout-based detection.
MQTT vs HTTP vs OPC-UA: A Comparison for Industrial Teams
| Attribute | MQTT | HTTP/REST | OPC-UA |
|---|---|---|---|
| Communication model | Publish-subscribe | Request-response | Client-server and pub-sub |
| Overhead per message | Very low (2-byte minimum header) | High (full HTTP headers per request) | Medium to high |
| Designed for | Constrained devices, sensor networks | Web APIs, human-initiated requests | PLC/SCADA integration, rich data models |
| Data modeling | None (payload is arbitrary bytes) | None built-in | Rich built-in data model and type system |
| Security | Optional TLS; username/password; client certs | TLS standard; OAuth common | Built-in security modes; certificate-based |
| Best used for | Edge-to-cloud sensor telemetry at scale | Enterprise integrations, dashboards | Plant-floor PLC/controller integration |
Many modern industrial architectures use both MQTT and OPC-UA. A PLC or SCADA system may communicate internally using OPC-UA, while an edge gateway converts and forwards that data upstream via MQTT for transmission to cloud analytics or a Unified Namespace.
MQTT in Condition Monitoring and Sensor Networks
Condition-based monitoring requires a steady stream of data from assets distributed across a facility. Sensors measuring vibration, temperature, current, and pressure generate readings continuously, sometimes at hundreds of samples per second per sensor. HTTP polling would overload the network and introduce latency; MQTT handles these workloads natively.
A typical deployment works as follows: sensors or edge gateways connected to equipment publish readings to an on-premises or cloud MQTT broker. A condition monitoring platform subscribes to relevant topics and processes the incoming data stream in real time, triggering alerts when readings cross thresholds or when machine learning models detect patterns associated with equipment failure.
MQTT is also central to machine-to-machine (M2M) communication architectures where assets must share status information with each other or with control systems without human intervention. For example, a sensor detecting abnormal vibration can publish an alert that automatically triggers a work order in a connected CMMS.
MQTT and the Unified Namespace
The Unified Namespace (UNS) is an increasingly popular industrial architecture pattern in which all data across a facility, from sensors and PLCs to ERP and MES systems, is published to a single shared MQTT broker. Every system in the enterprise subscribes to the topics it needs, and publishes data it generates, without point-to-point integrations between systems.
MQTT's publish-subscribe model is the natural transport layer for a UNS because it allows any number of producers and consumers to exchange data without coupling. A maintenance team adopting a UNS approach can expect MQTT brokers to be a core piece of their Industry 4.0 infrastructure, alongside DCS and MES systems.
MQTT Security Considerations for Industrial Deployments
MQTT was designed for constrained environments where security was not always feasible, so the protocol does not enforce authentication or encryption by default. In industrial deployments, this creates risk if brokers are left with default settings.
The core security practices for industrial MQTT deployments are:
- Transport encryption: Always use TLS on port 8883 rather than unencrypted TCP on port 1883. This prevents eavesdropping and man-in-the-middle attacks on sensor data.
- Authentication: Require username and password credentials at minimum. For critical systems, use mutual TLS with client certificates to verify device identity.
- Authorization: Configure the broker with topic-level access control lists (ACLs) so each device or application can only publish or subscribe to its authorized topics.
- Network segmentation: Place the MQTT broker in a dedicated network zone and restrict access using firewall rules. Sensors should not be able to reach the internet directly.
- Broker hardening: Disable anonymous connections, limit message size, and set appropriate rate limits to prevent denial-of-service conditions from misconfigured devices.
Operational technology environments warrant extra care because sensor networks often mix older devices that cannot support TLS with modern gateways that can. In these cases, securing the gateway and isolating legacy devices on a separate VLAN is a pragmatic approach.
Common MQTT Brokers Used in Industry
The choice of broker affects scalability, management overhead, and integration options. The most widely used brokers in industrial contexts are:
- Eclipse Mosquitto: Open-source, lightweight, and widely deployed on edge gateways and small on-premises servers. Suitable for facilities with a few hundred devices.
- HiveMQ: Enterprise-grade broker with strong clustering, management console, and extension ecosystem. Common in large industrial IoT deployments.
- EMQX: High-throughput open-source and enterprise broker capable of handling millions of concurrent connections. Popular in cloud-scale IoT platforms.
- AWS IoT Core / Azure IoT Hub: Cloud-managed MQTT endpoints with built-in authentication, device management, and integration to cloud analytics services.
For most manufacturing facilities, an on-premises broker paired with selective cloud forwarding provides the best balance of latency, data sovereignty, and real-time monitoring capability.
MQTT Versions: MQTT 3.1.1 vs MQTT 5
MQTT 3.1.1 is the version most widely deployed in existing industrial systems. MQTT 5, released in 2019, introduced several features relevant to maintenance operations:
- Reason codes: Every acknowledgment now includes a reason code, making it far easier to diagnose connection failures and delivery errors.
- Message expiry: Publishers can set a time-to-live on messages so stale readings are discarded if they have not been consumed within a defined window.
- User properties: Key-value metadata can be attached to any message without changing the payload format, enabling richer data tagging without schema changes.
- Shared subscriptions: Multiple subscribers can share a subscription to the same topic, distributing message processing across multiple consumers without duplicate delivery.
Teams building new asset condition monitoring infrastructure should consider MQTT 5 for its improved diagnostics and operational flexibility, particularly the message expiry and reason codes.
The Bottom Line
MQTT is the communications backbone of modern industrial sensor networks. Its publish-subscribe model, minimal overhead, and flexible delivery guarantees make it the right protocol for transmitting high-frequency machine data from the plant floor to monitoring platforms, maintenance systems, and analytics engines.
For maintenance and operations teams, MQTT is not just a developer concern. Understanding how the broker, topics, and QoS levels work helps teams design reliable data pipelines, troubleshoot gaps in sensor coverage, and evaluate whether their condition monitoring infrastructure can support real-time predictive analytics. As facilities move toward Industry 4.0 architectures, MQTT fluency is becoming a practical competency for reliability engineers and maintenance managers alike.
See Real-Time Sensor Data in Action
Tractian's condition monitoring platform uses MQTT-connected sensors to stream vibration, temperature, and current data directly to your maintenance team, no coding required.
Get a DemoFrequently Asked Questions
What is MQTT used for in industrial settings?
MQTT is used to transmit sensor data from machines and equipment to centralized monitoring platforms. In industrial settings, it enables real-time condition monitoring, predictive maintenance, and remote equipment monitoring by reliably delivering data from sensors attached to motors, pumps, compressors, and other assets over low-bandwidth or unreliable network connections.
What is the difference between MQTT and HTTP?
HTTP uses a request-response model where a client must ask for data each time. MQTT uses a publish-subscribe model where data is pushed automatically to all subscribers when it is available. MQTT is far more efficient for sensor networks because it has a much smaller packet overhead and maintains a persistent connection, whereas HTTP opens and closes a connection with every request.
What is an MQTT broker?
An MQTT broker is a server that receives all messages from publishing devices and routes them to the correct subscribing clients based on topic filters. The broker decouples publishers from subscribers, so each sensor only needs to connect to the broker rather than knowing the addresses of all receiving systems. Common brokers include Eclipse Mosquitto, HiveMQ, and EMQX.
What are MQTT QoS levels?
MQTT offers three Quality of Service levels. QoS 0 delivers a message at most once with no acknowledgment (fire and forget). QoS 1 delivers a message at least once and requires an acknowledgment, meaning duplicates are possible. QoS 2 delivers a message exactly once using a four-step handshake, which is the most reliable but also the slowest. Maintenance teams typically use QoS 1 or 2 for critical alert data.
Is MQTT secure enough for industrial use?
MQTT itself is a lightweight transport protocol and does not mandate security by default. However, it supports TLS/SSL encryption, username and password authentication, and client certificate authentication. For industrial deployments, it is standard practice to run MQTT over TLS on port 8883, enforce client authentication, and place the broker inside a secured network segment or behind a VPN.
What is the difference between MQTT and OPC-UA?
MQTT is a lightweight messaging transport protocol optimized for low-bandwidth, high-latency environments with large numbers of simple devices. OPC-UA is a full industrial communication standard that includes its own data modeling, security, and service definitions. OPC-UA is better suited for machine-to-machine communication within a plant floor where rich data context is needed, while MQTT is preferred for transmitting data from edge devices to cloud or enterprise systems at scale.
Can MQTT work without an internet connection?
Yes. MQTT only requires a TCP/IP network, which can be a local area network with no internet access. Many industrial deployments run an on-premises MQTT broker on the plant LAN so sensor data never leaves the facility. Internet connectivity is only needed if data must be sent to a cloud platform.
Related terms
Cycle Time: Definition, Formula and How to Measure It
Learn what cycle time is, how it's calculated, why it matters and how to optimize it in manufacturing and maintenance operations.
Data Collection Standardization: Definition, Benefits and Best Practices
Learn what data collection standardization is, why it matters for maintenance and operations and how to implement consistent data practices.
DCS (Distributed Control System): Definition, Components and How It Works
Learn what a DCS is, how it works, its components, benefits and why it is critical for manufacturing and process automation.
Deferred Maintenance: Definition, Costs and Risks
Learn what deferred maintenance is, why it happens, the financial and operational risks and how to avoid it.
Maintenance Technician: Roles, Skills and Career Path
Learn what a maintenance technician does, required skills, certifications, career growth and why they are critical to equipment reliability.