Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A food delivery platform is designing a resilient, event-driven system to process order status updates (such as 'Order Placed', 'Out for Delivery', and 'Delivered'). The order status updates for each individual order must be processed in the exact chronological sequence they occur to ensure the customer dashboard displays accurate updates. A marketing analytics service also needs to receive these updates to track daily delivery metrics, but ordering is not critical for this service. Which combination of actions should a solutions architect take to meet these requirements with the least operational overhead? (Select TWO.)

  1. Create an Amazon SNS FIFO topic to receive the updates, and use the order ID as the message group ID.Answer
  2. Create an Amazon SQS FIFO queue for the customer dashboard service, and subscribe it to the SNS FIFO topic.Answer
  3. C
    Create a standard Amazon SQS queue for the customer dashboard service, and subscribe it to the SNS FIFO topic.
  4. D
    Create a standard Amazon SNS topic to receive the updates, and subscribe an Amazon SQS FIFO queue for the customer dashboard service to it.
  5. E
    Create a standard Amazon SQS queue for the customer dashboard service, and configure the service to query the queue using client-side ordering logic.

Answer

To decouple the systems and maintain chronological ordering, create an Amazon SNS FIFO topic using the order ID as the message group ID, and subscribe an Amazon SQS FIFO queue for the customer dashboard service to the SNS FIFO topic.
To satisfy the strict chronological ordering requirement with minimal operational overhead, the solution must implement FIFO messaging end-to-end. Creating an Amazon SNS FIFO topic and specifying the order ID as the message group ID ensures that events for a specific order are partitioned and ordered correctly. Subscribing an Amazon SQS FIFO queue to this SNS FIFO topic ensures that the customer dashboard service consumes these updates in order. The marketing analytics service (which does not require ordering) can also subscribe to the SNS FIFO topic using its own SQS FIFO queue, since SNS FIFO only supports SQS FIFO subscriptions.

Step-by-Step Solution

1
Analyze the ordering requirement.
Order status updates for individual orders must be processed chronologically, requiring first-in, first-out (FIFO) delivery semantics.
Standard messaging services do not guarantee strict ordering, so FIFO-enabled services are required.
2
Select the appropriate fan-out and messaging decoupling components.
An Amazon SNS FIFO topic is selected for event fan-out, and an Amazon SQS FIFO queue is selected for the order-sensitive customer dashboard subscriber.
SNS FIFO topics support SQS FIFO queues as subscribers to guarantee end-to-end message ordering and deduplication.
3
Configure the message grouping strategy.
The order ID is specified as the message group ID for the SNS FIFO topic.
The message group ID determines the ordering scope, ensuring updates for the same order are processed sequentially without impacting other concurrent orders.

Key Concept

Preserving message ordering end-to-end in event-driven systems using Amazon SNS FIFO and Amazon SQS FIFO integration.
Rate this question