Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A restaurant chain is implementing a cloud-based kitchen display system. When a customer places an order, the order details must be sent to the kitchen terminal and to a real-time analytics dashboard. The kitchen terminal must receive and display orders in the exact sequence they were submitted by the customer. The analytics dashboard does not require strict ordering. If an order fails to process after multiple attempts, it must be isolated for troubleshooting with the least operational overhead.

Which combination of steps should a solutions architect take to meet these requirements? (Select TWO.)

  1. Create an Amazon SNS FIFO topic. Create an Amazon SQS FIFO queue for the kitchen terminal and a standard Amazon SQS queue for the analytics dashboard. Subscribe both queues to the SNS FIFO topic.Answer
  2. Configure a redrive policy on the SQS queues to send failed messages to a dead-letter queue (DLQ) after the maximum receive count is exceeded.Answer
  3. C
    Create a standard Amazon SNS topic. Create standard Amazon SQS queues for both the kitchen terminal and the analytics dashboard, and subscribe both queues to the SNS topic.
  4. D
    Create an Amazon SNS FIFO topic. Create a standard Amazon SQS queue for the kitchen terminal and an Amazon SQS FIFO queue for the analytics dashboard, and subscribe both queues to the SNS FIFO topic.
  5. E
    Configure a dead-letter queue (DLQ) directly on the Amazon SNS FIFO topic to handle messages that the kitchen terminal application fails to process.

Answer

Create an Amazon SNS FIFO topic, create an Amazon SQS FIFO queue for the kitchen terminal, subscribe both queues to the SNS FIFO topic, and configure a redrive policy on the SQS queues to send failed messages to a dead-letter queue (DLQ).
To achieve both event fan-out and strict ordering for one of the downstream consumers, the architect must combine an Amazon SNS FIFO topic with an Amazon SQS FIFO queue. SNS FIFO topics support fanning out messages to multiple SQS queues. By subscribing an SQS FIFO queue for the ordering-sensitive kitchen terminal and a standard SQS queue for the analytics dashboard (which does not require strict ordering), both consumers receive the messages appropriately. Furthermore, configuring a redrive policy on the SQS queues allows messages that repeatedly fail processing to be automatically sent to a dead-letter queue (DLQ) for isolation and troubleshooting with minimal operational overhead.

Step-by-Step Solution

1
Analyze the fan-out and ordering requirements.
Identified that the system requires sending a single event to two different consumers (fan-out pattern) with one consumer requiring strict message ordering (FIFO).
This determines that Amazon SNS is needed for fan-out and FIFO capabilities are required for ordering.
2
Select the correct SNS and SQS queue types.
Choose an Amazon SNS FIFO topic to publish events. For the kitchen terminal, select an Amazon SQS FIFO queue. For the analytics dashboard, select a standard Amazon SQS queue. Subscribe both queues to the SNS FIFO topic.
SNS FIFO topics can fan out to both SQS FIFO and standard SQS queues, preserving order for the FIFO queue while delivering to both.
3
Address the processing failure isolation requirement.
Configure a redrive policy on the SQS queues to direct failed messages to an SQS dead-letter queue (DLQ) after a specified maximum receive count.
SQS redrive policies isolate messages that fail application-level processing after multiple retries.

Key Concept

Decoupling message fan-out with ordering guarantees using Amazon SNS FIFO and SQS FIFO queues.
Rate this question