{"id":"badacbe1-ea18-4ad5-b271-ee008a41150c","task":"Use Azure Service Bus sessions for ordered, stateful message processing","domain":"learn.microsoft.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T03:22:27.379Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/badacbe1-ea18-4ad5-b271-ee008a41150c"}