AZ-305 Question 173
Single answerAn online retailer is implementing a new microservices-based order processing system. During peak traffic (e.g., holiday sales), thousands of orders are placed within a short timeframe and must be processed reliably. The retailer must ensure messages are delivered even if recipients are temporarily offline, maintain message ordering for certain workflows, and facilitate dead-lettering when processing fails repeatedly. Which Azure messaging service should be the primary queueing solution?
- A
Azure Storage Queues
- B
Azure Service Bus
- C
Azure Event Hubs
- D
Azure Event Grid
Show answer and explanation
Correct answer: B
Explanation
Azure Service Bus is typically the recommended choice for enterprise-grade messaging where message ordering, dead-lettering, and robust error handling are required. According to Microsoft documentation on messaging services, Service Bus sessions enable ordered delivery, while the built-in dead-letter queue helps manage processing failures without losing messages.
- A. Incorrect.
Option 1 (Azure Storage Queues): While Storage Queues can handle large volumes of messages at low cost, they do not natively provide advanced features like sessions for strict ordering or built-in dead-lettering. A developer could implement retries or error queues, but it requires more custom work compared to other services.
- B. Correct.
Option 2 (Azure Service Bus): Service Bus is designed for reliable enterprise messaging with built-in dead-lettering, sessions (which can help implement FIFO ordering), and transactional support. It’s well-suited for scenarios where strict message ordering and robust error handling are required, making it the best choice in this case.
- C. Incorrect.
Option 3 (Azure Event Hubs): Event Hubs primarily targets high-throughput data ingestion scenarios such as telemetry or streaming. While it can handle large volumes, it is not intended for ordered queue-based communication with guaranteed at-least-once delivery and dead-letter queues in the same way Service Bus is.
- D. Incorrect.
Option 4 (Azure Event Grid): Event Grid is a lightweight event routing service focused on reactive event-driven architectures. It doesn’t provide persistent queuing or the advanced messaging features (like sessions or dead-letter queues) required for this scenario.