What is mqtt

Last updated: April 1, 2026

Quick Answer: MQTT stands for MQ Telemetry Transport, a lightweight messaging protocol designed for efficient communication between connected devices in Internet of Things (IoT) applications and remote sensors.

Key Facts

Overview

MQTT (MQ Telemetry Transport) is a messaging protocol specifically designed for the constraints of IoT devices and unreliable networks. Created by Andy Stanford-Clark and Arlen Nipper in 1999, MQTT has become the de facto standard for IoT communication worldwide. The protocol operates on a publish-subscribe model where devices publish messages to topics and other devices subscribe to those topics, receiving updates automatically without requiring direct connections between publishers and subscribers.

How MQTT Works

MQTT operates with a central message broker that manages all communications. Publishers send messages to specific topics, and subscribers receive messages from subscribed topics without needing to know publisher details. This decoupling allows flexible, scalable architectures. The protocol uses a binary message format minimizing bandwidth, essential for devices operating on battery power or unreliable connections. Messages remain small and efficient, making MQTT ideal for constrained environments where every byte matters.

Quality of Service Levels

MQTT defines three quality-of-service (QoS) levels ensuring flexible message delivery guarantees. QoS 0 offers fire-and-forget delivery with no confirmation or retries. QoS 1 guarantees at-least-once delivery with broker acknowledgment. QoS 2 ensures exactly-once delivery, preventing duplicates through a handshake protocol. Applications select appropriate levels based on requirements, balancing reliability against resource usage. This flexibility allows MQTT to handle diverse scenarios from casual sensor readings to critical control commands.

Real-World Applications

MQTT powers numerous IoT applications including smart home systems where devices like thermostats, lights, security cameras, and smart plugs communicate efficiently. Industrial automation uses MQTT for machine monitoring and predictive maintenance. Healthcare applications employ MQTT for remote patient monitoring and health sensors. Environmental monitoring networks use MQTT to collect data from distributed weather and air quality sensors. Automotive and fleet management applications leverage MQTT for vehicle telemetry and location tracking.

Security and Reliability

MQTT supports TLS/SSL encryption for secure communications, protecting data in transit. Authentication mechanisms prevent unauthorized access through username/password credentials. The last-will feature enables devices to send final messages upon unexpected disconnection, alerting systems to device failure. Persistent connections reduce overhead compared to polling-based approaches. These features make MQTT suitable for both public and private IoT networks requiring strong security and reliability.

Related Questions

How is MQTT different from HTTP?

MQTT uses persistent connections and publish-subscribe messaging, consuming significantly less bandwidth and power. HTTP requires separate requests for each communication, making it less efficient for frequent IoT sensor updates and real-time applications.

What devices can use MQTT?

MQTT works on any device with TCP/IP connectivity, including microcontrollers, smartphones, computers, and servers. Its lightweight nature makes it suitable for devices with limited memory and processing power.

Is MQTT secure?

MQTT supports TLS encryption and username/password authentication. Security depends on proper implementation, but correctly configured MQTT systems provide strong security for IoT communications and sensitive data.

Sources

  1. Wikipedia - MQTT CC-BY-SA-4.0