Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Compare

Azure Service Bus vs Event Grid

30-second answer

Use Service Bus for messages: commands or jobs a back end must process reliably, with peek-lock, sessions and dead-letter queues. Use Event Grid for events: small notices that something happened, pushed to handlers with filters and retries.

Simulate it »

Side by side

↔ Swipe the table to see every column.

Service BusEvent Grid
CarriesMessages (the data and the intent)Events (a fact: “blob created”)
DeliveryReceivers pull (or a trigger listens)Pushed to the handler
OrderingFIFO with sessionsNot guaranteed
Failed processingAbandon, retry, dead-letter queueRetry up to 24 hours, then optional dead-letter
Fan-outTopics and subscriptionsMany event subscriptions per topic
Typical AI useQueue summarisation jobsStart indexing when a file is uploaded

Prices are illustrative pay-as-you-go list prices converted at approximate rates, for "price feel" only. Check the Azure pricing calculator for real quotes.

Which one should I pick?

  • Service Bus

    Pick it when the work must not be lost and may take time, like processing an order or a PDF

  • Event Grid

    Pick it when you want to react quickly to something that happened in Azure or in your app

Simulate it

3D Messaging, events and Functions for AI back ends Publish to a topic, then filter events.

🖱️ Drag to rotate · scroll or pinch to zoom

Loading the 3D scene…
</> Embed

Embed this simulation

Free for trainers, teachers and bloggers. Paste this into your page:

Topics and subscriptions

A topic is a queue with many readers. Each subscription gets its own copy of every message, and filters (SQL or correlation) decide which messages a subscription keeps. One "document uploaded" message can feed indexing, billing and audit.

Read this tour as text
  1. Don’t make users wait. Summarising a 40-page PDF takes a minute. If the web API does it inline, requests pile up and time out. Put a message on a queue instead, reply "accepted", and let a worker do the slow part.
  2. Service Bus queue: peek-lock. An Azure Service Bus queue hands each message to one receiver. In peek-lock mode the message is locked, not removed. The worker completes it when done, or abandons it so it can be tried again. If the worker crashes, the lock expires and the message comes back.
  3. Dead-letter queue. A poison message fails every time. After max delivery count attempts (10 by default) Service Bus moves it to the dead-letter queue (DLQ), a sub-queue you read, fix and resubmit. Expired messages can go there too.
  4. Topics and subscriptions. A topic is a queue with many readers. Each subscription gets its own copy of every message, and filters (SQL or correlation) decide which messages a subscription keeps. One "document uploaded" message can feed indexing, billing and audit.
  5. Event Grid: something happened. Azure Event Grid pushes events (small facts: "blob created") to handlers. You can publish custom events to a custom topic. Event subscriptions pick the handler, and filters (event type, subject begins/ends with, advanced) cut out the noise.
  6. Event Grid retries. If the handler is down, Event Grid retries with exponential backoff, by default up to 30 attempts within 24 hours (you can lower both). After that it drops the event, unless you configured dead-lettering to a storage container.
  7. Functions: triggers and bindings. An Azure Function runs when its trigger fires: HTTP, Service Bus, Event Grid, timer, Cosmos DB and more. Bindings connect inputs and outputs without client code: an HTTP-triggered API can write a message to a queue with an output binding.
  8. Functions scale with the work. On the Flex Consumption plan a function app adds instances as messages arrive and scales to zero when idle. Premium keeps warm instances to avoid cold starts. Settings live in app settings, and you deploy a zip package or a container.

Questions people ask

Can they work together?

Yes. Event Grid can deliver events into a Service Bus queue, so a worker processes them reliably at its own pace.

What about Event Hubs?

Event Hubs is for streaming millions of telemetry events per second. It is not in the AI-200 skills list, but it is a common distractor.

Learn each one properly

More comparisons

Install MSDEVBUILD Azure

Free · no account · works offline

Save the whole course for offline ›

Hi, I’m your Nimbus

Your study buddy. Pick what we do next.

MSDEVBUILD · Multi-Stack Dev Build

Sign in to MSDEVBUILD

One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.