Soru

Zorluk: Çok zorImplement Azure Service Bus Solutions

You are designing an airline flight booking system that processes seat reservation requests using Azure Service Bus queues. The system must meet the following technical requirements:
- Seat reservations for any specific flight must be processed in the exact order they are received.
- Any duplicate reservation requests sent due to client-side network retries within a 10-minute window must be automatically discarded by the queue.
- If a message fails to be processed after 5 attempts, it must be automatically routed to a dead-letter queue.

Which two configurations should you implement to satisfy the message ordering and duplicate detection requirements? (Select two.)

  1. Enable sessions on the queue, and set the SessionId property on each sent message to the flight identifier.Cevap
  2. Enable duplicate detection on the queue with a 10-minute detection window, and ensure the sender sets a unique MessageId on each message.Cevap
  3. C
    Configure the receiver to use the ReceiveAndDelete receive mode, and set the queue's MaxDeliveryCount to 5.
  4. D
    Authenticate the message-sending client using a Shared Access Signature (SAS) token configured with Manage permissions at the namespace level.

Cevap

Enable sessions on the queue while setting the SessionId to the flight identifier, and enable duplicate detection on the queue while ensuring the sender sets a unique MessageId on each message.
To satisfy the requirements, you must enable sessions for message ordering and configure duplicate detection. Specifically, setting the SessionId on sent messages to the flight identifier ensures sequential processing of related messages. Enabling duplicate detection with a 10-minute window requires assigning a unique MessageId to each message so the Service Bus can track and discard duplicates.

Adım Adım Çözüm

1
Enable sessions on the queue and set the SessionId property on each message.
Guarantees FIFO (first-in-first-out) ordering for seat reservations on a per-flight basis, as all messages with the same SessionId are processed sequentially by a single consumer.
Standard queues do not guarantee message order when multiple consumers read from them, but sessions lock messages to a single receiver to enforce order.
2
Enable duplicate detection on the queue and define a 10-minute duplicate detection window.
Enables the queue to detect duplicate messages sent within the window based on their MessageId.
Ensures that if the sender retries sending a message due to a network timeout, the duplicate message is automatically discarded if it arrives within the configured duplicate detection window.
3
Set a unique MessageId on each sent message.
Enables Azure Service Bus to match and de-duplicate messages.
Duplicate detection relies entirely on the MessageId property. If this property is not set uniquely by the sender, Service Bus cannot identify duplicates.

Anahtar Kavram

Message sessions for FIFO processing and duplicate detection for idempotent message delivery in Azure Service Bus.
Bu soruyu puanla