You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Azure provides three messaging and eventing services, each designed for different scenarios. Choosing the wrong service leads to over-engineering, under-engineering, or architectural mismatches that are costly to fix. This lesson provides a clear decision framework based on the characteristics of your workload.
| Dimension | Service Bus | Event Grid | Event Hubs |
|---|---|---|---|
| Purpose | Enterprise message broker | Serverless event routing | Big-data streaming platform |
| Pattern | Queue + pub-sub (topics) | Pub-sub (reactive) | Partitioned log (streaming) |
| Message model | Messages (commands/work) | Events (notifications) | Events (data stream) |
| Max message size | 256 KB (Standard), 100 MB (Premium) | 1 MB (64 KB recommended) | 1 MB (Standard), 1 MB (Premium/Dedicated) |
| Delivery | At-least-once, at-most-once | At-least-once | At-least-once |
| Ordering | FIFO (within session or partition) | No ordering guarantee | FIFO within partition |
| Retention | Until consumed | Retry window (up to 24 hours) | 1–90 days (or unlimited) |
| Throughput | Thousands/second | Millions/second (lightweight) | Millions/second (data-heavy) |
| Protocol | AMQP 1.0, HTTP | HTTP (webhooks, CloudEvents) | AMQP 1.0, HTTP, Kafka |
| Pricing | Per-message + base | Per-event (pay for what you use) | Per throughput/processing unit + time |
| Dead-lettering | Built-in sub-queue | To Blob Storage | No built-in DLQ |
| Transactions | Yes | No | No |
| Sessions | Yes | No | No |
| Duplicate detection | Yes | No | No |
The first question is whether you are sending messages (commands, work items) or events (notifications, telemetry).
If you are sending events:
If you need any of the following, use Service Bus:
If your team already uses Apache Kafka or you need Kafka-compatible producers/consumers → Event Hubs (with Kafka endpoint).
Requirements: Reliable delivery, ordering per order, dead-lettering for failed orders, duplicate prevention.
Best choice: Service Bus (queue with sessions and duplicate detection)
Why:
Requirements: Trigger a function when a blob is uploaded, a VM is created, or a key vault secret is updated.
Best choice: Event Grid (system topics)
Why:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.