An e-commerce company is designing an order processing application on AWS. When a customer places an order, the application must publish order events to multiple downstream services. The transaction service must process payments in the exact order they are received to ensure ledger accuracy. However, the shipping notification service and the analytics service can process events asynchronously without strict ordering requirements. If a service fails to process an order event after multiple retries, the event must be isolated for troubleshooting without blocking other orders.
Which TWO configurations should a solutions architect recommend to meet these requirements with the least operational overhead?
- Publish order events to an Amazon SNS FIFO topic. Subscribe an Amazon SQS FIFO queue for the transaction service, and subscribe standard Amazon SQS queues for the shipping and analytics services.Answer
- Configure a redrive policy on the SQS queues to redirect failed messages to a dead-letter queue (DLQ) after the maximum receive count is exceeded.Answer
- CPublish order events to a single standard Amazon SQS queue. Configure all downstream services to poll the queue simultaneously, relying on standard SQS ordering to process transactions in sequence.
- DIngest all order events using an Amazon Kinesis Data Stream with provisioned shards, relying on the stream to automatically increase the shard count during peak traffic to prevent throttling.
- EWrite transaction records directly to a primary Amazon RDS DB instance, and configure downstream services to poll a Read Replica for updates, using the Read Replica as the primary failover target if the primary database fails.
Answer
Publishing order events to an Amazon SNS FIFO topic with SQS FIFO and standard SQS queues subscribed, combined with configuring redrive policies to a dead-letter queue (DLQ) for failed messages.
Publishing events to an Amazon SNS FIFO topic enables message fan-out to multiple downstream queues while preserving ordering. Subscribing an SQS FIFO queue ensures the transaction service processes orders sequentially, while subscribing standard SQS queues for shipping and analytics allows them to run asynchronously without ordering constraints. Using SQS redrive policies to a DLQ isolates failed messages after a specified number of retries, preventing head-of-line blocking.
Step-by-Step Solution
Key Concept
Decoupling event-driven architectures using Amazon SNS FIFO fan-out to SQS queues, combined with dead-letter queues (DLQ) for fault isolation.
Estimated Time:2m 0s