Message Queuing Telemetry Transport (MQTT) is a lightweight, publish-subscribe network protocol designed for efficient machine-to-machine communication in constrained environments with low bandwidth, high latency, or unreliable networks. It operates over TCP/IP and uses a central message broker to decouple clients, which publish messages to topics or subscribe to receive them, making it ideal for Internet of Things (IoT) telemetry and heterogeneous fleet orchestration where agents must share state and commands.
Glossary
Message Queuing Telemetry Transport (MQTT)

What is Message Queuing Telemetry Transport (MQTT)?
A definition of the lightweight MQTT protocol for machine-to-machine messaging in constrained environments.
The protocol's efficiency stems from its small packet overhead and support for three Quality of Service (QoS) levels, which define delivery guarantees from fire-and-forget to exactly-once. This makes MQTT a foundational standard for inter-agent communication in logistics and warehousing, enabling real-time coordination between autonomous mobile robots and backend systems while conserving battery and network resources on edge devices.
Key Features of MQTT
MQTT's design is optimized for constrained environments, prioritizing efficiency, reliability, and simplicity in machine-to-machine communication.
Publish/Subscribe Pattern
MQTT decouples message producers (publishers) from consumers (subscribers) using a central broker. Publishers send messages to topics (e.g., fleet/robot-12/status), and subscribers receive only the messages for topics to which they have subscribed. This enables:
- One-to-many distribution: A single status update can be broadcast to all monitoring dashboards.
- Dynamic scaling: New subscribers can join without reconfiguring publishers.
- Loose coupling: Agents don't need to know each other's network addresses.
Lightweight & Bandwidth Efficient
The protocol uses a compact binary header, minimizing packet size. A connect packet can be as small as 2 bytes, and publish messages add minimal overhead. This is critical for:
- Low-bandwidth networks: Common in remote industrial sites or mobile fleets using cellular data.
- High-latency links: Smaller packets reduce transmission time.
- Battery-powered devices: Reduced data transmission conserves energy. Compared to HTTP with its verbose headers, MQTT significantly reduces network traffic for telemetry data.
Quality of Service (QoS) Levels
MQTT defines three delivery guarantees to balance reliability and overhead:
- QoS 0 (At most once): Fire-and-forget. No acknowledgment. Lowest overhead, potential for message loss.
- QoS 1 (At least once): Acknowledged delivery. The sender stores and retransmits until an acknowledgment (PUBACK) is received. Guarantees delivery but may cause duplicates.
- QoS 2 (Exactly once): Guaranteed, duplicate-free delivery. Uses a four-step handshake (PUBLISH, PUBREC, PUBREL, PUBCOMP). Highest reliability and overhead. In fleet orchestration, QoS 1 is typical for critical commands, while QoS 0 suffices for high-frequency sensor data.
Persistent Sessions & Last Will Testament
These features manage client state and handle unexpected disconnections gracefully.
- Persistent Session: A client can request the broker to store its subscriptions and missed messages (QoS 1/2) while offline, resuming seamlessly upon reconnection.
- Last Will and Testament (LWT): During connection, a client specifies a message the broker will publish if the client disconnects ungracefully. For example, a robot's LWT to topic
fleet/alertswith payload{"agent": "robot-7", "status": "connection_lost"}immediately alerts the system to a potential failure.
Topic Wildcards & Hierarchical Structure
Topics are structured as strings with slash (/) separators, forming a hierarchy. Subscribers can use wildcards for flexible filtering:
- Single-level (
+): Matches exactly one level. Subscribing tofleet/+/batteryreceives messages forfleet/robot-1/batteryandfleet/agv-5/battery. - Multi-level (
#): Matches all subsequent levels. Subscribing tofleet/robot-12/#receives all messages for that specific robot (e.g.,.../status,.../sensors/lidar). This allows a central monitor to subscribe tofleet/#to see all fleet traffic, while individual controllers subscribe to specific agent paths.
Retained Messages & Keep Alive
These mechanisms ensure timely data delivery and connection health.
- Retained Messages: A publisher can flag a message on a topic as "retained." The broker stores the last retained message on that topic and delivers it immediately to any new subscriber. This is essential for a new dashboard joining to instantly get the latest known state of all agents.
- Keep Alive: The client specifies a time interval (in seconds). If no messages are sent within this period, it must send a PINGREQ packet to prove it's alive. If the broker receives nothing, it will close the connection and can trigger the client's LWT.
How MQTT Works
A technical overview of the lightweight publish-subscribe messaging protocol designed for constrained environments.
Message Queuing Telemetry Transport (MQTT) is a lightweight, publish-subscribe network protocol designed for efficient machine-to-machine communication in constrained environments with low bandwidth and high latency. It operates over TCP/IP and uses a central message broker to manage communication between publishers (data sources) and subscribers (data consumers) via a system of topics. This decoupled architecture allows devices to communicate asynchronously without needing direct knowledge of each other's network addresses, making it ideal for Internet of Things (IoT) and mobile applications where connections are unreliable.
The protocol's efficiency stems from its minimal packet overhead and support for three Quality of Service (QoS) levels: 0 (at-most-once), 1 (at-least-once), and 2 (exactly-once). It also features a Last Will and Testament (LWT) mechanism to notify other clients of an unexpected disconnection and retained messages to provide the latest known state to new subscribers. These features, combined with its small code footprint, make MQTT a foundational protocol for heterogeneous fleet orchestration, enabling reliable communication between autonomous mobile robots, sensors, and central control systems in dynamic logistics environments.
MQTT vs. Other Messaging Protocols
A technical comparison of MQTT against other prominent messaging protocols used in distributed and edge systems, focusing on characteristics critical for heterogeneous fleet orchestration.
| Feature / Metric | MQTT | AMQP | DDS | gRPC | |
|---|---|---|---|---|---|
Primary Communication Pattern | Publish-Subscribe | Publish-Subscribe, Point-to-Point, Request-Reply | Publish-Subscribe | Request-Reply, Streaming | |
Transport Protocol | TCP/IP (also WebSockets) | TCP/IP | UDP/IP, TCP/IP | HTTP/2 | |
Message Header Overhead | < 10 bytes | ~ 40-60 bytes | ~ 20-40 bytes | ~ 60-100 bytes (HTTP/2 + Protobuf) | |
Default Quality of Service (QoS) Levels | 3 levels (0,1,2) | Reliable, At-Least-Once | 22 QoS policies | Exactly-once semantics (streaming RPC) | |
Built-in Service Discovery | |||||
Data-Centric Model | |||||
Typical Latency | < 100 ms | 10-100 ms | < 10 ms (for real-time profiles) | 1-10 ms (LAN) | |
Ideal Use Case | Constrained devices, high-latency networks | Enterprise message queuing, complex routing | Hard real-time systems, data-centric apps | High-performance microservices, internal APIs | |
Stateful Sessions | |||||
Payload Agnostic | Protobuf by default) | ||||
Wildcard Topic Subscriptions |
Common Use Cases for MQTT
MQTT's lightweight, publish-subscribe architecture makes it the protocol of choice for connecting devices and systems in environments where bandwidth, power, or network reliability are constrained. Its core use cases center on efficient, real-time data distribution.
Industrial IoT & Telemetry
MQTT is the dominant protocol for Industrial Internet of Things (IIoT) telemetry. Its minimal overhead is ideal for transmitting sensor data from Programmable Logic Controllers (PLCs), Supervisory Control and Data Acquisition (SCADA) systems, and environmental monitors.
- Key Applications: Machine health monitoring, predictive maintenance, real-time process variable reporting (e.g., temperature, pressure, flow rates).
- Example: A fleet of autonomous mobile robots (AMRs) in a warehouse publishing their battery voltage, motor temperature, and current location to a central orchestration platform every few seconds.
Real-Time Fleet State Synchronization
In heterogeneous fleet orchestration, MQTT provides a unified communication layer for real-time state synchronization. Each agent (robot, vehicle, drone) publishes its status to topics like fleet/agent-001/pose or fleet/agent-001/battery, while the central orchestrator subscribes to aggregate this data for a global view.
- Key Features: Enables fleet state estimation and dynamic task allocation by providing a low-latency stream of agent vitals.
- Pattern: Uses Quality of Service (QoS) Level 1 (at-least-once delivery) to ensure critical state messages are received, even over unreliable Wi-Fi or cellular networks in dynamic environments.
Command & Control for Mobile Agents
MQTT's publish-subscribe model is perfectly suited for one-to-many command distribution. A central orchestration middleware can publish a high-priority task to a topic like commands/zone-a/pick, and all agents capable of handling that task type can subscribe and bid for the work.
- Key Applications: Priority-based routing instructions, emergency stop signals, dynamic zone access permissions, and software update triggers.
- Advantage: Decouples the command source from the agents, allowing for scalable and flexible real-time replanning without persistent point-to-point connections.
Event-Driven Exception Handling
MQTT facilitates an event-driven architecture for managing operational exceptions. Agents can publish error events (e.g., alerts/agent-005/obstacle-collision) to which dedicated exception handling frameworks subscribe. This triggers automated recovery workflows or alerts human operators via human-in-the-loop interfaces.
- Key Use: Deadlock detection alerts, low-battery warnings, sensor failure notifications, and task completion/failure events.
- Integration: Often paired with a message broker that supports retained messages and Last Will and Testament (LWT) to notify the system immediately if an agent disconnects unexpectedly.
Lightweight Mobile & Remote Monitoring
Due to its small code footprint and efficient bandwidth usage, MQTT is ideal for edge AI devices and remote assets with limited connectivity. It allows sensors on solar-powered field equipment or telematics units in long-haul trucks to transmit data over expensive or low-bandwidth satellite/cellular links.
- Key Applications: Agricultural sensor networks, remote asset tracking, environmental monitoring stations, and telemedicine devices.
- Optimization: Uses QoS Level 0 (at-most-once delivery) for non-critical data to maximize battery life and minimize data costs.
Bridging to Enterprise Systems
MQTT acts as a critical bridge between the operational technology (OT) layer of physical devices and the information technology (IT) layer of enterprise systems. A message broker can receive telemetry via MQTT and then forward it using other protocols (like AMQP or gRPC) to cloud databases, analytics dashboards, or ERP systems.
- Key Pattern: Change Data Capture (CDC) from edge devices, feeding real-time data lakes for predictive analytics and digital twin updates.
- Example: Warehouse robot throughput data published via MQTT is aggregated and pushed to a supply chain intelligence platform for autonomous demand forecasting.
Frequently Asked Questions
Essential questions about MQTT, the lightweight publish-subscribe protocol designed for efficient machine-to-machine communication in constrained environments like heterogeneous fleets.
Message Queuing Telemetry Transport (MQTT) is a lightweight, publish-subscribe network protocol designed for efficient machine-to-machine (M2M) communication in constrained environments with low bandwidth and high latency. It operates on a central message broker that decouples clients. Devices (publishers) send messages to the broker organized by topics (e.g., fleet/robot-12/battery). Other devices (subscribers) that have expressed interest in those topics receive the messages from the broker. This architecture minimizes network overhead and allows for one-to-many communication essential for broadcasting fleet state updates.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
MQTT operates within a broader ecosystem of messaging patterns, protocols, and reliability mechanisms essential for robust fleet communication. These related concepts define how data flows, is guaranteed, and is secured in distributed systems.
Publish-Subscribe Pattern
The publish-subscribe pattern (pub/sub) is the foundational messaging paradigm that MQTT implements. In this architecture, message senders (publishers) categorize messages into logical channels called topics without knowing the identities of the receivers. Receivers (subscribers) express interest in one or more topics and receive only the messages relevant to them. This decouples producers from consumers, enabling scalable, one-to-many communication ideal for broadcasting sensor data or fleet-wide commands.
- Decoupling: Publishers and subscribers operate independently.
- Dynamic Topology: Subscribers can join or leave without disrupting the system.
- Scalability: A single message can be efficiently delivered to thousands of subscribers.
Quality of Service (QoS) Levels
Quality of Service (QoS) levels in MQTT define the delivery guarantees for messages between clients and brokers, balancing reliability against network overhead. MQTT specifies three levels:
- QoS 0 (At most once): The message is delivered at most once, with no acknowledgment or retry. This is the fastest but least reliable mode, suitable for frequent, non-critical sensor readings where occasional loss is acceptable.
- QoS 1 (At least once): The message is guaranteed to be delivered at least once to the receiver. Acknowledgments and retries are used, which may result in duplicate messages. This is common for critical command delivery.
- QoS 2 (Exactly once): The message is guaranteed to be delivered exactly once through a four-step handshake. This is the most reliable but also the most bandwidth and latency-intensive, used for critical state changes or financial transactions.
Message Broker
A message broker is intermediary software that facilitates communication between different applications or services by implementing core messaging patterns. In an MQTT system, the broker is the central hub responsible for:
- Session Management: Maintaining persistent connections with clients and their subscriptions.
- Topic Filtering: Receiving all published messages and distributing them to clients with matching subscriptions.
- QoS Enforcement: Managing message delivery guarantees, retransmissions, and acknowledgments.
- Security: Often handles client authentication and authorization.
Popular open-source MQTT brokers include Eclipse Mosquitto, EMQX, and HiveMQ. The broker abstracts network complexity, allowing lightweight clients (like robots or sensors) to communicate efficiently.
Advanced Message Queuing Protocol (AMQP)
AMQP is an open standard application-layer protocol for enterprise-grade message-oriented middleware. While MQTT is optimized for simplicity and constrained networks, AMQP is designed for robust, complex business messaging with strong reliability guarantees.
Key comparisons with MQTT:
- Model: AMQP uses a richer model of exchanges, queues, and bindings, whereas MQTT uses a simpler topic-based pub/sub model.
- Overhead: AMQP has a larger protocol overhead, making it less ideal for very low-bandwidth scenarios where MQTT excels.
- Features: AMQP natively supports advanced features like transactional messaging, dead-letter queues, and sophisticated routing, which MQTT typically delegates to the broker implementation.
- Use Case: AMQP is commonly used in financial services and enterprise application integration, while MQTT dominates IoT and real-time telemetry.
Data Distribution Service (DDS)
Data Distribution Service (DDS) is a middleware protocol and API standard for scalable, real-time, high-performance data exchange in distributed systems. Unlike MQTT's client-broker architecture, DDS uses a peer-to-peer model where participants communicate directly.
Contrast with MQTT for Fleet Orchestration:
- Discovery: DDS has built-in dynamic discovery of publishers and subscribers without a central broker, reducing a single point of failure.
- Latency: The peer-to-peer model can offer lower latency, critical for real-time control loops in autonomous systems.
- Quality of Service: DDS provides a vastly more granular set of over 20 QoS policies (e.g., deadline, liveliness, ownership) for fine-tuned data flow control.
- Complexity: DDS is more complex to implement and is typically used in demanding environments like aerospace, automotive, and industrial control, where MQTT may be chosen for its operational simplicity and ubiquitous cloud broker support.
Retry Logic with Exponential Backoff
Retry logic with exponential backoff is a critical fault-tolerance strategy used in conjunction with MQTT, particularly for client connection management and QoS 1/2 operations. When a network operation (like connecting or publishing) fails, the client does not retry immediately but waits for an increasing interval before each subsequent attempt.
Mechanism: The wait time typically follows a sequence like: 1 second, 2 seconds, 4 seconds, 8 seconds, up to a maximum cap. A jitter (random variation) is often added to prevent many clients from retrying simultaneously.
Purpose in MQTT Systems:
- Prevents Thundering Herds: Avoids overwhelming a recovering broker or network.
- Conserves Resources: Reduces battery drain and CPU usage on constrained edge devices.
- Handles Transient Failures: Allows time for temporary network issues or broker restarts to resolve. This pattern is essential for building resilient agents that maintain eventual connectivity in unstable warehouse or outdoor environments.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us