Azure Service Bus · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services
An application may retry sending an invoice message because of a transient network failure. The application sets the same MessageId for each retry, a…
Practice question from Azure Service Bus (AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services), with the correct answer and a step-by-step solution.
medium · MCQ · Q-DD7717
An application may retry sending an invoice message because of a transient network failure. The application sets the same MessageId for each retry, and duplicate detection is enabled on the Azure Service Bus queue with a detection window that includes all retries. How does Service Bus handle a retry whose MessageId matches a message already accepted within the detection window?
- A.It stores the retry as a separate message because the message bodies may differ.
- B.It rejects the entire queue because duplicate MessageId values are invalid.
- C.It accepts the retry but assigns it a new MessageId.
- D.It suppresses the duplicate and does not add another copy to the queue.Correct answer
Solution
Service Bus duplicate detection uses the MessageId value within the configured detection window. A message with a previously accepted MessageId is suppressed, helping make retried sends idempotent.
More from Azure Service Bus
- An order-processing application must send the same order notification independently to an email service, an inventory service, and an analy…
- A .NET application uses an Azure.Messaging.ServiceBus ServiceBusProcessor with AutoCompleteMessages set to false and the default PeekLock r…
- A billing system sends multiple messages for each customer and sets the same SessionId for all messages belonging to that customer. The app…
- A worker receives a message from an Azure Service Bus queue in PeekLock mode, but the message contains invalid data and cannot be processed…
Practise more Connect to and Consume Azure and Third-party Services
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed