AZ-305 · Question #279
You are designing an app that will include two components. The components will communicate by sending messages via a queue. You need to recommend a solution to process the messages by using a First…
The correct answer is B. Azure Service Bus queues with sessions enabled. To ensure messages are processed in a First-In, First-Out (FIFO) pattern between application components, Azure Service Bus queues with sessions enabled should be recommended.
Question
Options
- Astorage queues with a custom metadata setting
- BAzure Service Bus queues with sessions enabled
- CAzure Service Bus queues with partitioning enabled
- Dstorage queues with a stored access policy
How the community answered
(39 responses)- A5% (2)
- B82% (32)
- C10% (4)
- D3% (1)
Why each option
To ensure messages are processed in a First-In, First-Out (FIFO) pattern between application components, Azure Service Bus queues with sessions enabled should be recommended.
Azure Storage Queues do not guarantee a strict FIFO order for message processing, and custom metadata settings do not alter this fundamental behavior.
Azure Service Bus queues with sessions enabled are designed to guarantee ordered delivery of messages belonging to a specific session, thereby enforcing a First-In, First-Out (FIFO) pattern for those grouped messages. Message sessions allow for the grouping of related messages into a single logical stream, ensuring that a specific receiver processes messages from that stream sequentially.
Partitioning in Azure Service Bus queues increases throughput and availability by distributing messages across multiple message brokers but does not guarantee message order, and can actually break strict FIFO if messages are distributed.
A stored access policy for storage queues is used to manage access permissions and does not provide any mechanism for guaranteeing FIFO message processing.
Concept tested: Azure Service Bus sessions for FIFO message processing
Source: https://learn.microsoft.com/en-us/azure/service-bus-messaging/message-sessions
Community Discussion
No community discussion yet for this question.