A developer is designing a system for an online gaming platform where player score updates must be processed in the exact order they occur. The platform must also fan out these updates to both a leaderboard service and an archiving service, ensuring each service receives a copy of every update. Which combination of configurations will meet these requirements? (Select TWO.)
- Publish the score updates to an Amazon SNS FIFO topic.Answer
- Subscribe two Amazon SQS FIFO queues to the SNS FIFO topic, one for each consumer service.Answer
- CPublish the score updates to an Amazon SNS standard topic and enable raw message delivery on the subscriptions.
- DSubscribe two Amazon SQS standard queues to the SNS FIFO topic, as SNS FIFO topics can deliver messages in an ordered sequence to standard queues.
- ESet the visibility timeout of the SQS queues to seconds to ensure that consumer instances immediately receive the next ordered message in the queue.
Answer
Publish the score updates to an Amazon SNS FIFO topic, and subscribe two Amazon SQS FIFO queues to the SNS FIFO topic, with one queue dedicated to each consumer service.
To achieve ordered processing and message fanout, the developer must use an Amazon SNS FIFO topic combined with Amazon SQS FIFO queues. SNS FIFO topics preserve the order of messages, and when SQS FIFO queues are subscribed to them, the ordering is maintained end-to-end. By creating two SQS FIFO queues (one for the leaderboard and one for archiving), both services receive every message in the correct sequence.
Step-by-Step Solution
Key Concept
End-to-end message ordering using Amazon SNS FIFO and Amazon SQS FIFO fanout integration.