Azure Messaging Services Compared
Service Bus, Event Grid, Event Hubs or Storage queues? Pick by what you send: a message with a contract or an event that says something happened.
By tools4free.dev · Last reviewed 4 December 2026
Short answer: pick the service by what the thing you send is. A message is raw data with a contract between sender and receiver, such as an order. Use Service Bus when you need ordering, transactions, duplicate detection or dead-lettering, and Storage queues when you only need a simple, large backlog of work. An event is a notification that something happened. Use Event Grid to react to a state change and Event Hubs to ingest a high-volume stream of telemetry. Exam questions hide this distinction behind words such as "order", "telemetry", "blob created" and "background job".
tools4free.dev is not affiliated with, endorsed by or sponsored by Microsoft. Facts on this page come from Microsoft Learn pages listed under Sources. Features and limits change, so confirm details on Microsoft Learn before you rely on them.
Events versus messages
Microsoft's comparison article starts with this split, and most exam answers follow from it.
- An event is a lightweight notification of a condition or state change. The publisher has no expectation about how the event is handled. Events can be discrete (a state change you can act on) or part of a time-ordered series (a condition you analyse).
- A message is raw data produced by a service to be consumed or stored elsewhere. A contract exists between publisher and consumer. For example, the sender expects the consumer to create a file from the data and reply when the work is done.
Event Grid and Event Hubs deal in events. Service Bus and Storage queues deal in messages. Event Grid handles discrete events; Event Hubs handles event streams.
Comparison table
| Dimension | Service Bus | Storage queues | Event Grid | Event Hubs |
|---|---|---|---|---|
| Primary purpose | Enterprise transactional messaging | Large backlog of work to process asynchronously | Reactive event routing | Big data streaming and ingestion |
| Data model | Messages (high-value payloads) | Messages up to 64 KB | Events (discrete notifications) | Event streams (time-ordered series) |
| Delivery guarantee | At least once; at most once in ReceiveAndDelete mode | At least once | At least once | At least once |
| Ordering | FIFO by using sessions | Not guaranteed | No guarantee | Per partition |
| Transactions | Yes | No | No | No |
| Duplicate detection | Yes | No | No | No |
| Dead-lettering | Yes (automatic) | No (you build your own, using the dequeue count) | Yes | No |
| Publish-subscribe | Topics and subscriptions | No (point-to-point queue) | Yes | Consumer groups |
| Protocols | AMQP 1.0, HTTP | HTTP or HTTPS | MQTT, HTTP | Apache Kafka, AMQP 1.0, HTTPS |
| Capture or replay | No | No | No | Yes (Event Hubs Capture) |
| Scaling model | Messaging units (Premium) | Up to the storage account capacity limit | Automatic (serverless) | Throughput units or processing units |
The Service Bus, Event Grid and Event Hubs columns come from Microsoft's "Compare messaging services" article. The Storage queues column comes from "Compare Azure Storage queues and Service Bus queues" and the Queue Storage introduction.
Choose Service Bus when…
Service Bus is a fully managed enterprise message broker with queues and publish-subscribe topics. Microsoft's guidance lists these reasons to pick it over a Storage queue:
- Guaranteed first-in, first-out (FIFO) delivery. Words: "in order", "sequence", "per customer", "session".
- Automatic duplicate detection. Words: "must not process twice", "resent".
- Transactional behaviour and atomicity across several messages. Words: "all or nothing", "financial transaction".
- Dead-lettering for messages that cannot be processed or expire. Words: "poison message", "inspect failed messages".
- Publish-subscribe with filtering. A topic can have several independent subscriptions, and each subscription rule has a filter and an optional action. Words: "each department receives its own copy", "only messages where…".
- Scheduled delivery, message deferral, autoforwarding or sessions with application state.
- Role-based access with different rights for senders and receivers, plus managed identities.
- Messages that may exceed 64 KB. Microsoft says Service Bus queues can handle messages up to 100 MB with large message support on Premium.
- Standards-based AMQP 1.0, or Java Message Service (JMS) 2.0, which Service Bus Premium supports, when moving from another broker.
Service Bus receives in pull mode, and a pull can be long-lived and complete only when a message arrives, so consumers do not need to busy-poll. Once the broker accepts a message it holds it durably in triple-redundant storage, spread across availability zones if the namespace is zone-enabled.
Choose Storage queues when…
Queue Storage is part of Azure Storage. A message can be up to 64 KB, and a queue can hold millions of messages, up to the capacity limit of the storage account. Microsoft recommends considering it when:
- The queue must hold more than 80 GB of messages. Words: "very large backlog".
- You want to track processing progress inside the message, so another worker can continue where a crashed worker stopped. Storage queues let you update a message in place.
- You need server-side logs of every transaction run against the queue.
- The requirement is a plain work backlog: decouple components, level the load, build a process workflow. No ordering, transactions or duplicate detection are mentioned.
Be aware of what you give up. Storage queues are typically FIFO but can be out of order, for example when a message's visibility timeout expires after a worker crashes and it becomes visible again. There is no automatic dead-lettering. To find poison messages you check the dequeue count and move the message yourself to an application-defined queue. Receive is non-blocking: it completes immediately when no message is found. By default a message lives for seven days; with version 2017-07-29 or later you can set any positive time-to-live or -1 for no expiry.
Choose Event Grid when…
Event Grid is a scalable publish-subscribe service that uses MQTT and HTTP. It supports the CloudEvents 1.0 specification. Think of it as the wiring that says "when X happens, tell Y". Words that point to it: "react to", "trigger a function when a blob is created", "notify subscribers of a state change", "serverless", "partner SaaS events", "MQTT".
- Sources: Azure services (system events), your own applications, and partner software-as-a-service systems.
- Push delivery: you define an event subscription and Event Grid sends events to a destination such as a webhook, an Azure Function or event hubs. Push delivery has a 24-hour retry mechanism with exponential backoff.
- Pull delivery: subscribers connect to Event Grid and consume events from topics in a namespace. Choose pull when your application is not always up, when you want to release a read event back to the broker for later, or when you want private links, which Microsoft says are possible only with pull delivery.
- MQTT: devices publish and subscribe with MQTT v3.1.1 and v5.0, and Event Grid can route those messages to Azure services or custom endpoints.
- Filtering: advanced filtering on event type or other attributes means handlers receive only relevant events.
Choose Event Hubs when…
Event Hubs is a fully managed, real-time data streaming platform that can ingest millions of events per second with low latency. It supports Apache Kafka, AMQP 1.0 and HTTPS. Words that point to it: "telemetry", "clickstream", "log aggregation", "millions of events per second", "Kafka", "real-time analytics", "replay", "stream".
- Events are written to partitions, which are ordered sequences. Order is guaranteed per partition, not across the whole hub.
- Consumer groups let several applications read the same stream independently, each tracking its own position (offset).
- Data retention is up to 7 days on Standard and up to 90 days on Premium and Dedicated.
- Capture writes the stream to Azure Blob Storage or Azure Data Lake Storage in near real time for long-term retention or batch analytics.
- Existing Kafka workloads can run against Event Hubs without code changes or cluster management.
Worked scenarios
Scenario 1: order processing
Requirement: a retailer's checkout sends orders to a back-end system. Orders from the same customer must be processed in the order they were placed. An order must never be processed twice if the sender retries. Orders that repeatedly fail must be set aside for an operator.
Answer: Service Bus queue with sessions, duplicate detection and the dead-letter queue.
Why the others fail: Storage queues give no ordering guarantee, no duplicate detection and no automatic dead-lettering. Event Grid has no ordering guarantee, no transactions and no duplicate detection. Event Hubs keeps order only per partition, has no duplicate detection and no dead-lettering. The orders are messages with a contract, not notifications.
Scenario 2: react to uploads
Requirement: when a file is created in a storage account, an Azure Function must run to process it. The solution must be serverless and need no polling.
Answer: Event Grid with an event subscription that pushes the storage event to the function.
Why the others fail: a blob being created is a discrete notification of a state change, which is Event Grid's job and an Azure service is a built-in event source. Service Bus would need extra code to send a message for each upload. Event Hubs is built for high-volume streams, not one-off reactions. A Storage queue would need a polling worker.
Scenario 3: device telemetry
Requirement: thousands of sensors send readings continuously. A stream analytics job processes them in real time, and the raw data must also be archived to Azure Data Lake Storage. The team already has Apache Kafka producers.
Answer: Event Hubs, with Capture enabled for the archive.
Why the others fail: Event Hubs is the only one of the four with Kafka protocol support and a built-in capture feature. Service Bus is designed for high-value transactional messages rather than telemetry streams. Event Grid does not offer capture or replay. A Storage queue has a 64 KB message limit and no stream semantics such as consumer groups.
Scenario 4: background job backlog
Requirement: a web front end drops image-resize jobs onto a queue. Workers process them at their own pace. The backlog can grow past 80 GB, and the team wants server-side logs of every transaction against the queue. Ordering does not matter.
Answer: Azure Queue Storage.
Why the others fail: Microsoft lists "store over 80 gigabytes of messages in a queue" and "server side logs of all of the transactions" as reasons for Storage queues. It also says Service Bus queues suit queues that do not grow larger than 80 GB. Event Grid and Event Hubs deliver events, not a work backlog with per-message leases.
Common traps
- "Event Hubs for ordering." Order is per partition. Strict FIFO in this list needs Service Bus sessions.
- "Event Grid for guaranteed processing." It routes events. It has no transactions or duplicate detection. Push delivery retries for 24 hours with exponential backoff, which is not the same as a durable work queue.
- "Storage queues have a dead-letter queue." They do not. The Service Bus feature is automatic dead-lettering.
- "Exactly once" wording. Service Bus offers at-least-once by default. Microsoft's compare article lists exactly-once as optional with sessions, and notes that transaction failures cause redelivery, so applications should still be able to cope with that.
- Mixing up Event Hubs and Service Bus because both support AMQP. The protocol is not the deciding factor. Event Hubs adds Kafka and streaming; Service Bus adds JMS 2.0 on Premium and broker features.
- Treating the services as exclusive. Microsoft's own example uses Service Bus for orders, Event Hubs for site telemetry and Event Grid to respond to events such as an item being shipped, all in one e-commerce site. You can also link them: Event Grid can respond to events from the other services.
Quick decision list
- Order, invoice, payment, workflow step → Service Bus
- Needs FIFO, duplicates removed, transactions → Service Bus
- Huge simple backlog, track progress in the message → Storage queues
- Something happened, trigger a handler → Event Grid
- Millions of events per second, Kafka, capture → Event Hubs
FAQ
Can I use Service Bus for telemetry?
You can, but Microsoft positions Event Hubs for telemetry, distributed data streaming and real-time analytics. Service Bus is positioned for order processing, financial transactions and workflows.
Which services support publish-subscribe?
Three do in different forms: Event Grid (publish-subscribe), Event Hubs (consumer groups) and Service Bus (topics and subscriptions). A Storage queue is a point-to-point queue.
Which services support the MQTT protocol?
Event Grid supports MQTT and HTTP. Service Bus uses AMQP and HTTP. Event Hubs uses Apache Kafka, AMQP and HTTPS.
How long does Event Hubs keep data?
Microsoft's overview lists up to 7 days on Standard and up to 90 days on Premium and Dedicated. Capture can copy the stream to storage for longer retention.
How big can a message be?
A Storage queue message is up to 64 KB. Service Bus queues handle larger messages; Microsoft says up to 256 KB or 1 MB depending on tier, and up to 100 MB with large message support on Premium.
Related topic pages on this site
- AZ-305: Messaging and event services
- AZ-305: Confused pairs
- AZ-305: Decision guides
- AZ-305: Cram sheet
- Reading scenario questions