Use Azure Service Bus sessions for ordered, stateful message processing

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a Service Bus queue or topic subscription with session support enabled (requires Standard or Premium tier)
  2. Publish messages with the SessionId property set to a string identifying the ordered group
  3. On the consumer side, accept a session using the ServiceBusSessionReceiver (acceptSession or acceptNextSession) to lock the session exclusively
  4. Process and settle all messages in the session, then renew the session lock periodically if processing is long-running
  5. Configure dead-lettering on the subscription: messages that exceed MaxDeliveryCount are moved to the dead-letter subqueue automatically

Known gotchas

Related routes

Chain Azure Service Bus queues or topics together using auto-forwarding
learn.microsoft.com · 6 steps · unrated
Configure Azure Service Bus duplicate detection window and diagnose prefetch pitfalls
azure-service-bus · 6 steps · unrated
enable duplicate detection on an azure service bus queue that also uses scheduled messages
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans