Azure Service Bus · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services
A billing system sends multiple messages for each customer and sets the same SessionId for all messages belonging to that customer. The application m…
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.
hard · MCQ · Q-02D467
A billing system sends multiple messages for each customer and sets the same SessionId for all messages belonging to that customer. The application must process each customer's messages in order, while processing different customers concurrently. The queue has sessions enabled. Which receiver should the application use?
- A.A standard ServiceBusProcessor with multiple message handlers and no session configuration
- B.A ServiceBusReceiver created with ReceiveMode set to ReceiveAndDelete
- C.A ServiceBusSessionProcessor, allowing separate sessions to be processed concurrentlyCorrect answer
- D.A single ServiceBusReceiver that reads messages from the queue and sorts them by customer after receiving them
Solution
A ServiceBusSessionProcessor is designed for session-aware entities. Service Bus provides an exclusive session lock and preserves message order within a session, while different sessions can be handled concurrently. Receive mode does not provide ordering, and sorting after receipt cannot reliably restore the required processing semantics.
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 worker receives a message from an Azure Service Bus queue in PeekLock mode, but the message contains invalid data and cannot be processed…
- An application may retry sending an invoice message because of a transient network failure. The application sets the same MessageId for eac…
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