FREE STUDY NOTES · AI-200

Service Bus vs Event Grid vs Event Hubs: choosing Azure messaging

How to tell commands, discrete events and telemetry streams apart and pick the right Azure messaging service.

From Ultra Transcenders AI-200 by Tony Rough (publishing soon)

The three services overlap in vocabulary but solve different problems. Learn draws the line between an event, a lightweight notification that something happened where the publisher has no expectation about how it is handled, and a message, raw data with a contract between sender and receiver about what happens next.

Criterion Event Grid Event Hubs Service Bus
Primary purpose Reactive event routing Big data streaming and ingestion Enterprise transactional messaging
Data model Discrete events (notifications) Event streams (time-ordered series, telemetry) High-value messages
Delivery At least once, pushed to handlers (pull for namespace topics) At least once, consumers read from partitions At least once; ordered with sessions; duplicate detection available
Ordering No guarantee Per partition FIFO with sessions
Transactions No No Yes
Duplicate detection No No Yes
Dead-lettering Yes (to a storage blob container) No Yes (built-in sub-queue)
Replay / capture No Yes (Event Hubs Capture) No
Scaling model Automatic (serverless); throughput units for namespaces Throughput or processing units Messaging units (Premium)
Typical use React to a blob upload, a Key Vault secret nearing expiry, a custom “document indexed” event Telemetry, clickstreams, real-time analytics Order processing, job queues, workflows that can’t lose work

The services are often combined: Event Grid can notify a function that a blob was uploaded, the function can queue an embedding job in Service Bus, and telemetry can stream through Event Hubs.

Common trap: Using Event Grid as a work queue for jobs that must be processed in order and exactly once - Event Grid doesn’t guarantee order and has no duplicate detection or transactions; use Service Bus queues with sessions and duplicate detection.

Get the whole book

This note is one section of Ultra Transcenders AI-200: Developing AI Cloud Solutions on Azure, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.

Amazon.co.ukKindle: coming soonPaperback: coming soon
Amazon.comKindle: coming soonPaperback: coming soon

Publishing soon on Amazon in Kindle and paperback editions.

About the book · AI-200 terms in the glossary · All AI-200 study notes

More AI-200 study notes