Soru

Zorluk: KolayImplement Azure Service Bus Solutions

A logistics company runs a warehouse management system that processes package delivery messages from an Azure Service Bus queue. The processing application must meet the following requirements:
- Ensure that messages are only removed from the queue after they are successfully processed.
- If the application crashes or fails during processing, the message must automatically become visible to other instances of the receiver after the lock duration expires.
- Follow the principle of least privilege for security configuration.

Which two actions should you perform to implement this solution? (Select two.)

  1. Configure the ServiceBusReceiver to use PeekLock receive mode.Cevap
  2. Call the CompleteMessageAsync method after successful message processing.Cevap
  3. C
    Configure the ServiceBusReceiver to use ReceiveAndDelete receive mode.
  4. D
    Configure a Shared Access Signature (SAS) token with Manage authorization at the namespace level to authenticate the receiver client.

Cevap

Configure the receiver to use PeekLock receive mode, and call the CompleteMessageAsync method after successful message processing.
To satisfy the reliability requirement, the receiver must retrieve messages using the PeekLock receive mode, which locks the message temporarily instead of deleting it immediately. Once the message is successfully processed, the client must explicitly call CompleteMessageAsync to delete the message from the queue. This ensures that if the application crashes, the lock will expire and the message will reappear in the queue for processing.

Adım Adım Çözüm

1
Determine the correct message receive mode for reliable processing.
PeekLock mode must be used.
PeekLock ensures the message is locked on the queue rather than deleted, allowing recovery if the receiver crashes.
2
Determine how to complete the message lifetime on successful processing.
Call CompleteMessageAsync.
Calling CompleteMessageAsync deletes the locked message from the queue after processing is successfully finished.

Anahtar Kavram

Azure Service Bus Queue Message Processing Modes
Bu soruyu puanla