A retail system uses Azure Service Bus to process orders. Each order has multiple messages (e.g., payment, shipping, confirmation) that must be processed in sequence. You need to guarantee that all messages belonging to the same order are handled by the same consumer in order. Which Service Bus feature should you use?
Trap 1: Scheduled messages
Scheduled messages allow you to delay message delivery, not maintain ordering per group.
Trap 2: Dead-letter queue
Dead-letter queue stores messages that cannot be processed, not used for ordering.
Trap 3: Auto-forwarding
Auto-forwarding moves messages between entities automatically, but does not provide session-based ordering.
- A
Sessions
Sessions ensure FIFO ordering and guarantee that messages with the same session ID are processed by a single consumer.
- B
Scheduled messages
Why wrong: Scheduled messages allow you to delay message delivery, not maintain ordering per group.
- C
Dead-letter queue
Why wrong: Dead-letter queue stores messages that cannot be processed, not used for ordering.
- D
Auto-forwarding
Why wrong: Auto-forwarding moves messages between entities automatically, but does not provide session-based ordering.