Your profile

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

Azure Service Bus in 60 seconds

IntegrationEnterprise messagingAWS: Amazon SQS / SNS

What it is

Reliable message broker with queues (one receiver per message) and topics with subscriptions (a copy per subscription). Peek-lock, sessions, duplicate detection and dead-letter queues.

Simulate it »

✅ Use it when

  • Background jobs for slow AI work
  • Orders and payments that must not be lost
  • Fan-out to several back-end services

🚫 Not the best fit when

  • Millions of telemetry events per second (Event Hubs)

💰 Price feel: ●○○○ Free or very cheap

Basic ≈ $0.05 per 1M operations; Standard ≈ $10/month base; Premium per messaging unit

Illustrative pay-as-you-go list prices at approximate exchange rates. Use the Azure pricing calculator for real quotes.

Simulate it

3D Messaging, events and Functions for AI back ends Send, receive and complete a message.

🖱️ 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:

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.

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.
📘 Full lesson: Azure Service Bus Queues: Send, Receive and Settle Messages ❯ ⚖️ Azure Service Bus vs Event Grid ❯

Similar services

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.