Create a Service Bus queue or topic subscription with session support enabled (requires Standard or Premium tier)
Publish messages with the SessionId property set to a string identifying the ordered group
On the consumer side, accept a session using the ServiceBusSessionReceiver (acceptSession or acceptNextSession) to lock the session exclusively
Process and settle all messages in the session, then renew the session lock periodically if processing is long-running
Configure dead-lettering on the subscription: messages that exceed MaxDeliveryCount are moved to the dead-letter subqueue automatically
Known gotchas
Session-enabled queues cannot receive messages without a session; non-session receivers will throw an error
Only one receiver can hold a session lock at a time; if the lock expires without renewal, another receiver can acquire the session and may receive duplicate messages
Dead-lettered messages in Service Bus must be actively consumed from the dead-letter subqueue; they are not automatically retried or surfaced in dashboards
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp