Choosing a Messaging System: A 2026 Architect's Guide
Choosing the wrong messaging infrastructure is one of the most expensive mistakes an architect can make. It isn’t just about picking a tool; it’s about selecting the underlying contract for how your distributed components communicate.
You might start with a simple queue for background jobs. Six months later, you have a monolith that can’t scale, dropped messages during peak traffic, or a billing surprise from a high-throughput streaming service you didn’t realize you were overusing.
The landscape is fragmented. You have Message Queues (Amazon SQS, Azure Service Bus) for reliable, ordered processing. You have Event Routing (Azure Event Grid) for reactive, serverless triggers. You have Event Streaming (Azure Event Hubs) for massive data ingestion. And you have IoT Protocols (MQTT) for constrained, low-bandwidth edge devices.
This article cuts through the marketing noise. We will compare MQTT, Azure Service Bus, Azure Event Grid, Azure Event Hubs, and Amazon SQS across architecture, guarantees, and real-world trade-offs.
Note: If you are building on AWS, Amazon SQS is your native choice. If you are in the Microsoft/Azure ecosystem, Service Bus, Event Grid, and Event Hubs are your primary tools, often used in combination. MQTT is protocol-agnostic but often sits at the edge before feeding data into these cloud-native brokers.
Quick-Reference Comparison Table
Before diving into the deep dives, here is the high-level landscape. Use this to identify which category your problem belongs to.
| Feature | MQTT | Azure Service Bus | Azure Event Grid | Azure Event Hubs | Amazon SQS |
|---|---|---|---|---|---|
| Primary Role | IoT/Device Connectivity | Enterprise Messaging | Reactive Event Routing | Big Data Streaming | Distributed Queueing |
| Architecture | Pub/Sub (Client-Broker) | Queue & Topic (Broker) | Event Router (Pub/Sub) | Log/Stream (Kafka-like) | Queue (Pull-based) |
| Delivery Guarantee | QoS 0/1/2 (Configurable) | At-Least-Once (Exactly-Once*) | At-Least-Once | At-Least-Once | At-Least-Once (FIFO: Exactly-Once*) |
| Ordering | No (unless QoS 1/2 used carefully) | Yes (Queue) / Partitioned (Topic) | No | Yes (Per Partition) | No (Standard) / Yes (FIFO) |
| Throughput/Scale | High (per broker) | Very High | Very High (Millions of events) | Massive (Billions/day) | Very High (Standard) |
| Latency | Low (Edge to Cloud) | Low (single-digit ms) | Very Low (sub-second) | Low to Medium | Low |
| Retention | No (Transient) | Until consumed / TTL (≤14 days) | None (Push-based) | 1 hr–7 days (90 days Premium) | 60 s–14 days (default 4) |
| Protocol | TCP / WebSocket (TLS) | AMQP / HTTPS / JMS | HTTP / HTTPS / MQTT | AMQP / HTTPS / Kafka | HTTPS / SDK |
| Max Message Size | Broker-dependent | 256 KB (100 MB Premium) | 1 MB | 1 MB (20 MB Dedicated) | 256 KB (2 GB via S3) |
| Best For | IoT Sensors, Smart Home | Financial Transactions, Order Processing | Serverless Triggers, Cloud Alerts | Telemetry, Log Aggregation, Analytics | Decoupling Microservices, Async Jobs |
* "Exactly-once" here means exactly-once processing — achieved with duplicate detection plus Sessions (Service Bus) or message-group IDs (SQS FIFO), not a default delivery guarantee. Treat every system as at-least-once and make consumers idempotent.
1. MQTT (Message Queuing Telemetry Transport)
MQTT is not a cloud provider’s managed service; it is an open standard protocol. However, virtually every major cloud provider offers a managed MQTT broker (AWS IoT Core, Azure IoT Hub, Google Cloud IoT Core). When developers ask for "MQTT vs Azure Service Bus," they are usually comparing edge device communication against enterprise backend messaging.
What It Is & Core Architecture
MQTT operates on a Publish/Subscribe model using a central Broker. Devices (Publishers) send messages to specific Topics. Other devices or backend services (Subscribers) listen to those topics.
It is designed for constrained environments: low bandwidth, high latency, or unstable connections. It uses a lightweight header and binary protocol, making it far more efficient than HTTP/REST for sending small telemetry payloads. It runs over TCP (port 1883, or 8883 with TLS) and over WebSocket for browser clients — not UDP. The UDP-based protocol often confused with it is MQTT-SN, a separate variant for non-TCP sensor networks (e.g. Zigbee) that needs a gateway to bridge to a real MQTT broker.
Key Features
- Quality of Service (QoS):
- QoS 0: Fire and forget (no guarantee).
- QoS 1: At least once delivery (acknowledged, may duplicate).
- QoS 2: Exactly once delivery (guaranteed, highest overhead).
- Last Will and Testament (LWT): Allows a client to declare a message that the broker sends to subscribers if the client disconnects unexpectedly (critical for device health monitoring).
- Retained Messages: The broker keeps the latest message on a topic, so new subscribers immediately receive the current state (e.g., "temperature: 22°C") without waiting for a new event.
Ideal Use Cases
- IoT Sensor Networks: Smart agriculture, environmental monitoring, and industrial automation where devices are battery-powered and transmit small payloads infrequently.
- Smart Home Systems: Communication between thermostats, lights, and voice assistants.
- Mobile Applications: Push notifications or real-time status updates in low-bandwidth areas (e.g., messaging apps).
Limitations: When NOT to Use It
- Not for Enterprise Workflows: MQTT lacks the transactional integrity, complex routing, and deep security features required for financial settlements or complex order processing.
- No Message Retention by Default: If a subscriber goes offline and QoS 0 was used, the message is lost. It is not a durable queue for critical business logic.
- Security Complexity: While MQTT supports TLS/SSL, implementing mutual authentication (client certificates) at scale across thousands of IoT devices requires significant operational overhead.
2. Azure Service Bus
Azure Service Bus is the enterprise-grade message broker of the Microsoft Azure ecosystem. If you need guaranteed delivery, ordering, and complex routing, this is your foundation. It is the direct competitor to AWS SNS/SQS (for simple queues) and on-premise solutions like IBM MQ or RabbitMQ.
What It Is & Core Architecture
Service Bus provides two main communication patterns:
- Queues: Point-to-point communication. One sender, multiple potential receivers, but each message is processed by only one consumer. This is ideal for load balancing work.
- Topics & Subscriptions: Publish/Subscribe communication. One sender, multiple receivers. Each subscriber gets a copy of the message. Subscriptions can use SQL filters to receive only specific messages.
Tiers, limits & latency: Service Bus comes in Basic, Standard, and Premium. Basic/Standard bill per operation and cap message size at 256 KB; Premium runs on dedicated capacity — predictable latency, VNet isolation, JMS 2.0 — and supports payloads up to 100 MB over AMQP. Expect single-digit-millisecond latency, not sub-millisecond: this is a durable broker, not an in-memory cache. The "exactly-once" guarantee is really duplicate detection plus Sessions for ordered, stateful processing — so design consumers to be idempotent.
Key Features
- Transaction Support: Service Bus is one of the few cloud messaging systems that supports distributed transactions. You can send a message to a queue and update a database in a single atomic operation.
- Dead-Letter Queues (DLQ): Messages that fail processing too many times are moved to a DLQ for inspection, preventing "poison messages" from blocking the entire queue.
- Sessions: Allows grouping of messages to enable stateful processing. For example, ensuring all messages for a specific Customer ID go to the same consumer instance.
- Scheduled Delivery: You can submit messages to be made available for processing at a specific future time.
Ideal Use Cases
- Financial Transactions: Banking systems where money must move from Account A to Account B without loss or duplication.
- Order Processing: E-commerce platforms where inventory deduction, payment processing, and shipping notification must be coordinated reliably.
- Hybrid Cloud Integration: Bridging on-premise legacy systems with cloud microservices using the hybrid connections feature.
Limitations: When NOT to Use It
- Not for Big Data Streaming: Service Bus is not designed to ingest millions of telemetry events per second for analytics. It is too expensive and lacks the retention/replay capabilities of Event Hubs.
- Complexity: It is a heavy component. If you just need to trigger a serverless function when a file is uploaded, Service Bus is overkill.
3. Azure Event Grid
Azure Event Grid is a fully managed event routing service. It is not a queue; it is a router. Its job is to take an event from a source and deliver it to multiple subscribers instantly. It is the backbone of reactive, serverless architectures.
What It Is & Core Architecture
Event Grid follows a strict Publish/Subscribe model. It is push-based. When an event occurs (e.g., "File uploaded to Blob Storage"), Event Grid immediately pushes the event to registered endpoints (HTTP webhooks, Azure Functions, Logic Apps, Service Bus).
It is highly scalable and decoupled. Publishers do not know who the subscribers are.
Key Features
- Low Latency: Designed for sub-second delivery.
- Cloud Native Integration: Deeply integrated with Azure services (Storage, SQL, Compute). You can trigger Azure Functions directly from a resource change.
- CloudEvents Standard: Complies with the CloudEvents specification, making it easier to integrate with third-party event sources.
- Schema Flexibility: Supports custom input schemas, allowing you to structure events exactly how your handlers expect them.
Limits & cost: Maximum event size is 1 MB, and events larger than 64 KB are metered in 64 KB increments. Event Grid is billed per operation (roughly per million operations) rather than by provisioned throughput, and failed deliveries are retried for up to 24 hours with optional dead-lettering to a Storage account.
Ideal Use Cases
- Serverless Workflows: Triggering an Azure Function when a VM is created or a database row is updated.
- Real-Time Notifications: Sending a push notification to a user’s app when their order status changes.
- System Monitoring: Alerting systems when disk space is low or error rates spike.
Limitations: When NOT to Use It
- No Message Persistence: Event Grid does not store messages. If your subscriber endpoint is down, the event is lost (unless you implement dead-lettering to a storage account). It is not a queue.
- No Ordering Guarantees: Events are not delivered in order.
- Not for High-Volume Telemetry: If you are sending millions of data points per second, Event Grid will hit its throughput limits. Use Event Hubs for that.
4. Azure Event Hubs
Azure Event Hubs is a Big Data Streaming Platform. It is Microsoft’s answer to Apache Kafka. It is designed to ingest massive amounts of data from millions of devices or applications and make it available for real-time analysis or storage.
What It Is & Core Architecture
Event Hubs uses a partitioned log architecture, similar to Kafka. Data flows continuously into the hub. Multiple consumers can read from the same stream at their own pace. Retention is tier-dependent: Standard caps at 7 days, while Premium and Dedicated reach 90 days, and the Capture feature can offload events to Blob/Data Lake Storage for indefinite retention. Events are retained for a configurable period (up to 90 days), allowing you to "replay" history.
Key Features
- Massive Throughput: Can handle hundreds of thousands to millions of events per second. Capacity is provisioned in Throughput Units (Standard: 1 TU ≈ 1 MB/s or 1,000 events/s ingress), Processing Units (Premium), or Capacity Units (Dedicated), billed on that plus ingress events. Maximum event size is 1 MB (20 MB on Dedicated).
- Apache Kafka Compatibility: Event Hubs supports the Kafka protocol, allowing existing Kafka clients to connect with minimal code changes.
- Capture Feature: Automatically streams incoming data into Azure Blob Storage or Data Lake Storage for long-term retention and batch processing.
- Real-Time and Batch Processing: Supports both real-time stream analytics (Azure Stream Analytics) and micro-batch processing.
Ideal Use Cases
- IoT Telemetry Ingestion: Collecting temperature, GPS, and status data from thousands of connected vehicles or machines.
- Log and Metric Aggregation: Centralizing logs from distributed microservices for monitoring and debugging.
- Real-Time Analytics: Feeding data into Azure Synapse, Power BI, or Databricks for live dashboards.
Limitations: When NOT to Use It
- Not for Business Transactions: Event Hubs is "fire and forget" in terms of business logic. It does not guarantee that a specific order was processed successfully. Do not use it for financial settlements.
- Complexity: Requires careful management of partitions and consumer groups to avoid performance bottlenecks.
5. Amazon SQS (Simple Queue Service)
Amazon SQS is AWS’s native fully-managed message queue. It is the workhorse of the AWS ecosystem, used to decouple and scale microservices, serverless applications, and containerized workloads.
What It Is & Core Architecture
SQS provides a simple, highly scalable queue. Producers send messages to the queue. Consumers poll (pull) the queue to retrieve and process messages. There are two queue types: Standard and FIFO.
Key Features
- Standard Queues: Offer high throughput, near-order preservation, and at-least-once delivery. Messages may occasionally be delivered more than once or out of order.
- FIFO Queues: Guarantee first-in-first-out delivery and exactly-once processing. They use message deduplication IDs and message groups to ensure strict ordering.
- Visibility Timeout: When a consumer retrieves a message, it becomes invisible to other consumers for a set time. This prevents duplicate processing while the message is being handled.
- Dead-Letter Queues (DLQ): Failed messages are moved to a DLQ after a configurable number of receive attempts.
Limits, cost & fan-out: Messages are retained 60 seconds to 14 days (default 4 days) — SQS is not long-term storage, and unconsumed messages expire at the limit. Maximum payload is 256 KB, or up to 2 GB via the Extended Client Library (which stores the body in S3). Standard queues scale to effectively unlimited throughput; FIFO handles 300 messages/second (3,000 with batching), or up to 70,000/second in high-throughput mode. Billing is per request (per million API calls). Note that SQS has no native fan-out — to deliver one message to many subscribers, put Amazon SNS in front of it (the AWS counterpart to Service Bus Topics).
Ideal Use Cases
- Asynchronous Communication: Decoupling an e-commerce checkout process from payment processing.
- Load Leveling: Handling traffic spikes by buffering requests in the queue so downstream services aren’t overwhelmed.
- Background Tasks: Email sending, image resizing, or report generation.
Limitations: When NOT to Use It
- No Complex Routing: Unlike Azure Service Bus Topics or RabbitMQ Exchanges, SQS does not support complex content-based routing. You must use separate queues for different types of messages.
- No Transactions: SQS messages cannot be part of a distributed transaction.
- Standard Queue Ordering: If you need strict ordering, you must use FIFO queues, which have lower throughput limits (though high-throughput FIFO is now available).
Architectural Trade-offs: Head-to-Head
Now that we’ve looked at each system individually, let’s address the most common architectural dilemmas.
Azure Service Bus vs. Azure Event Grid
This is the most common confusion in the Azure ecosystem.
- Use Service Bus if: You need to move business data that must be processed reliably, in order, with acknowledgment. Examples: "Process this order," "Update this inventory count."
- Use Event Grid if: You need to react to a change in state. Examples: "A file was uploaded," "A user signed up."
The Hybrid Pattern: The most robust Azure architectures often combine them. Event Grid detects an event (e.g., "Payment Failed") and pushes it to a Service Bus queue. Service Bus then ensures the notification email is sent reliably, even if the email service is temporarily down.
Azure Event Hubs vs. Amazon SQS
These serve fundamentally different purposes.
- Event Hubs is a Pipeline: It is about ingesting and retaining massive streams of data for analytics. Think of it as a river that you can dip into multiple times.
- SQS is a Queue: It is about processing and completing discrete tasks. Think of it as a bucket that you fill and empty.
If you are sending clickstream data to Power BI, use Event Hubs. If you are sending user sign-up records to a background worker, use SQS.
MQTT vs. Everything Else
MQTT is not a direct competitor to Service Bus or SQS because it operates at a different layer.
- MQTT is for the Edge: It is optimized for the device-to-cloud connection. It is lightweight, connection-oriented, and works well over mobile networks.
- Cloud Brokers are for the Core: Once data hits the cloud, you move it from MQTT to a cloud-native broker (like Service Bus or Kinesis) for durable processing, analytics, and enterprise integration.
Recommendation: Use MQTT to ingest data from devices into Azure IoT Hub or AWS IoT Core, then use Event Grid or Service Bus to process that data within your cloud architecture.
Decision Framework: How to Choose
When faced with a new requirement, ask these questions in order. This decision tree will narrow your choices significantly.
Step 1: Is this data coming from an IoT device or constrained edge network?
- Yes: Use MQTT (via a managed broker like AWS IoT Core or Azure IoT Hub).
- No: Proceed to Step 2.
Step 2: Do you need to process massive volumes of telemetry, logs, or clickstream data for analytics?
- Yes: Use Azure Event Hubs (if on Azure) or Amazon Kinesis (if on AWS). These are built for high-throughput streaming and retention.
- No: Proceed to Step 3.
Step 3: Do you need to react instantly to a change in state to trigger a serverless function or webhook?
- Yes: Use Azure Event Grid (if on Azure) or AWS EventBridge (if on AWS). These are push-based routers designed for low-latency event notification.
- No: Proceed to Step 4.
Step 4: Do you need guaranteed message delivery, ordering, and reliability for business workflows?
- Yes: Use Azure Service Bus (if on Azure) or Amazon SQS (if on AWS).
- Sub-question: Do you need strict ordering and exactly-once delivery?
- Yes: Use Service Bus Sessions or SQS FIFO Queues.
- No: Use standard queues.
- Sub-question: Do you need strict ordering and exactly-once delivery?
- No: You might not need a message queue at all. Consider direct API calls or synchronous HTTP requests if the system is small enough.
Real-World Use Case Scenarios
Scenario 1: E-Commerce Order Processing
- Requirement: A user places an order. We need to deduct inventory, process payment, and send a confirmation email. If the payment fails, we must not ship the item.
- Recommended Stack: Azure Service Bus (or Amazon SQS).
- Why: You need transactional integrity. The order message must be processed exactly once. If the email service fails, the message should stay in the queue (or move to a DLQ) until it is retried. Event Grid is too ephemeral; Event Hubs is too heavy and lacks business logic guarantees.
Scenario 2: Smart City Traffic Monitoring
- Requirement: Thousands of traffic cameras and sensors send GPS and occupancy data every 5 seconds. The city needs a real-time dashboard and historical analysis for traffic pattern optimization.
- Recommended Stack: MQTT (at the edge) -> Azure Event Hubs (or Amazon Kinesis).
- Why: MQTT is efficient for the high volume of small, frequent sensor updates. Event Hubs can ingest millions of events per second, retain the data for 7 days, and stream it to Azure Synapse or Power BI for real-time analytics.
Scenario 3: Serverless Image Processing Pipeline
- Requirement: Users upload photos to a cloud storage bucket. When a photo is uploaded, an image processing function must resize it, add a watermark, and save it back to storage.
- Recommended Stack: Azure Blob Storage -> Azure Event Grid -> Azure Functions.
- Why: Event Grid is the perfect trigger. It detects the "Blob Created" event and instantly pushes the event to the Function. No queue is needed because the function is stateless and can handle the request immediately. If you used a queue, you would add unnecessary latency and complexity.
Scenario 4: Financial Trade Execution
- Requirement: A trading platform receives buy/sell orders from multiple exchanges. Orders must be processed in the exact order they were received, and no order can be lost or duplicated.
- Recommended Stack: Azure Service Bus (with Sessions) or Amazon SQS FIFO.
- Why: Financial systems require strict ordering and exactly-once processing. Event Grid does not guarantee order. Event Hubs guarantees order only per partition, which is insufficient for single-order accuracy across a global exchange. Service Bus or SQS FIFO provides the necessary guarantees.
Beyond the Big Five: The Wider 2026 Landscape
The five systems above are the ones most teams on Azure and AWS reach for first — but they are not the whole category. If you run open source, stay vendor-neutral, or live on Google Cloud, several other platforms belong on your shortlist. The most important omission is Apache Kafka: it is the de facto standard for event streaming and the most widely deployed platform in this space. Azure Event Hubs even speaks Kafka's protocol precisely because so much of the world is built on it.
| System | Category | Hosting | Best For |
|---|---|---|---|
| Apache Kafka | Event streaming (partitioned log) | Self-host, or managed: Confluent Cloud, AWS MSK, Redpanda, WarpStream | The event backbone — high-throughput streaming, replayable logs, stream processing |
| RabbitMQ | Message broker (AMQP) | Self-host, Amazon MQ, CloudAMQP | General-purpose queue + pub/sub for microservices; rich routing; lower throughput than Kafka |
| Google Cloud Pub/Sub | Managed pub/sub | GCP | GCP-native event ingestion and fan-out; the Google counterpart to SNS / Event Grid |
| NATS / JetStream | Lightweight messaging + streaming | Self-host, Synadia Cloud | Fast, simple microservice and edge/IoT messaging with a tiny footprint |
| Redis Streams / Pub/Sub | In-memory messaging | Self-host, managed Redis | Low-latency, lightweight queues when you already run Redis |
| Apache Pulsar | Unified queue + stream | Self-host, StreamNative | Multi-tenant, geo-replicated streaming; momentum has cooled vs the diskless-Kafka wave |
Apache Kafka: the streaming standard
Kafka is a distributed, partitioned commit log built to handle trillions of events per day. Conceptually it sits where Event Hubs does — durable, replayable streams read by independent consumer groups — but it is an open ecosystem rather than a single vendor's service. In 2026 the real choice is how you run it: fully managed Confluent Cloud (now an IBM product, following the acquisition that closed in March 2026), AWS MSK, or the wave of object-storage-backed, Kafka-compatible engines — Redpanda, WarpStream, and AutoMQ — that decouple compute from storage by writing segments straight to S3. If you need a cross-cloud event backbone, Kafka or one of its compatibles is usually the answer.
RabbitMQ: the open-source workhorse
RabbitMQ is the most widely used open-source broker and the natural open equivalent of Azure Service Bus: durable queues, topics, flexible exchange-based routing, and per-message acknowledgements. It shines for service-to-service messaging where you want rich routing and reliability without committing to a cloud vendor — trading away the raw throughput and long-term replay that Kafka offers.
The AWS siblings: SNS, Kinesis, and EventBridge
SQS is only one piece of the AWS messaging story, and each part has a near-direct Azure counterpart:
| AWS | Azure | Role |
|---|---|---|
| SQS | Service Bus Queues | Pull-based work queue |
| SNS | Service Bus Topics | Pub/sub fan-out (pair with SQS for queue + fan-out) |
| Kinesis | Event Hubs | High-throughput streaming with replay |
| EventBridge | Event Grid | Event routing to serverless targets |
A classic AWS pattern is SNS → SQS fan-out: publish once to a topic and every subscribing queue gets its own durable copy — the same shape as a Service Bus topic with multiple subscriptions.
Conclusion
There is no "best" messaging system. There is only the best system for your specific constraints.
- MQTT is the king of the edge, connecting billions of constrained devices.
- Event Hubs (and Kinesis) is the king of data, streaming terabytes of telemetry for analytics.
- Event Grid (and EventBridge) is the king of reactivity, triggering serverless functions in milliseconds.
- Service Bus (and SQS) is the king of reliability, ensuring that critical business transactions are processed exactly once and in order.
As a solution architect, your job is to match the tool to the job. Do not force a queue where an event router is needed, and do not use a streaming platform for a simple background task. By understanding the trade-offs between these five systems, you can build architectures that are scalable, resilient, and cost-effective.
If you are starting a new project, map your data flows against the decision framework above. And remember: in event-driven architecture, decoupling is free, but complexity is expensive. Choose wisely.