TECH_COMPARISON
MQTT vs AMQP: A Detailed Comparison for System Design
Compare MQTT and AMQP messaging protocols — explore trade-offs in overhead, reliability, routing, and IoT vs enterprise messaging use cases.
MQTT vs AMQP
MQTT and AMQP are both messaging protocols, but they target different environments. MQTT is designed for IoT and constrained devices with minimal overhead. AMQP is designed for enterprise messaging with rich routing and reliability features.
MQTT: Built for the Edge
MQTT (Message Queuing Telemetry Transport) was created for oil pipeline monitoring over satellite links. Its design reflects this origin: a 2-byte minimum header, simple connect/publish/subscribe operations, and the ability to run on microcontrollers with kilobytes of memory.
MQTT uses topic-based pub/sub with hierarchical wildcards (e.g., sensors/+/temperature). It supports three QoS levels and features like retained messages (new subscribers get the last value) and last will (notification when a device disconnects).
AMQP: Built for the Enterprise
AMQP (Advanced Message Queuing Protocol) was created for financial messaging. It provides exchanges with rich routing (direct, topic, fanout, headers), durable queues, message transactions, priority levels, TTL, and dead letter exchanges.
AMQP supports both pub/sub and point-to-point patterns, making it suitable for task distribution, request-reply, and event broadcasting.
The Overlap
RabbitMQ supports both protocols — AMQP natively and MQTT via a plugin. This allows IoT devices to publish via MQTT while enterprise consumers process messages via AMQP, combining the strengths of both.
For more on messaging architecture, see our messaging concepts and system design interview guide. Explore pricing for practice.
The Bottom Line
Use MQTT for IoT and constrained environments where minimal overhead is essential. Use AMQP for enterprise messaging where routing flexibility, transactions, and reliability features matter.
GO DEEPER
Master this topic in our 12-week cohort
Our Advanced System Design cohort covers this and 11 other deep-dive topics with live sessions, assignments, and expert feedback.
// RELATED_COMPARISONS
Kafka vs MQTT: A Detailed Comparison for System Design
Compare Apache Kafka and MQTT on IoT messaging, throughput, protocol weight, and when to use each for device-to-cloud communication.
NATS vs MQTT: A Detailed Comparison for System Design
Compare NATS and MQTT on protocol design, IoT support, messaging patterns, and edge deployment for real-time communication.
REST vs GraphQL: A Detailed Comparison for System Design
Compare REST and GraphQL APIs — learn the trade-offs in flexibility, performance, caching, and developer experience for modern system design.
REST vs gRPC: A Detailed Comparison for System Design
Compare REST and gRPC for system design — explore trade-offs in performance, serialization, streaming, and language support for microservices.
GraphQL vs gRPC: A Detailed Comparison for System Design
Compare GraphQL and gRPC — explore trade-offs in flexibility, performance, schema design, and when to use each in modern distributed systems.
Monolith vs Microservices: A Detailed Comparison for System Design
Compare monolithic and microservices architectures — understand trade-offs in scalability, deployment, team structure, and operational complexity.