Question

Difficulty: EasyDecoupling Architectures and Event-Driven Messaging

A gaming platform publishes real-time player match results. These results must be processed by two separate backend systems: a leaderboard service and an achievements service. To ensure accurate game statistics, the match results must be processed by both systems in the exact sequence they occur. Which combination of AWS services should the solutions architect select to decouple these systems while preserving the order of the match results? (Select TWO.)

  1. Amazon Simple Notification Service (Amazon SNS) FIFO topicAnswer
  2. Amazon Simple Queue Service (Amazon SQS) FIFO queuesAnswer
  3. C
    Amazon Simple Notification Service (Amazon SNS) Standard topic
  4. D
    Amazon Simple Queue Service (Amazon SQS) Standard queues
  5. E
    AWS Step Functions state machine

Answer

Amazon Simple Notification Service (Amazon SNS) FIFO topic and Amazon Simple Queue Service (Amazon SQS) FIFO queues
To decouple the game platform from the leaderboard and achievements services while maintaining message ordering, a combination of Amazon SNS FIFO and Amazon SQS FIFO is the standard architectural pattern. The SNS FIFO topic handles the message fan-out to multiple subscribers, and the SQS FIFO queues ensure that each service consumes the messages in the exact order they were sent.

Step-by-Step Solution

1
Identify the requirement to fan out message processing to multiple independent downstream systems (leaderboard and achievements services).
An Amazon SNS topic is required to publish messages once and deliver them to multiple subscribers.
SNS provides the publish/subscribe (fan-out) capability needed to send the same event to multiple destinations.
2
Identify the requirement to maintain strict ordering of events for both downstream systems.
FIFO (First-In-First-Out) features must be enabled on both the SNS topic and the SQS queues.
Standard SNS topics and SQS queues do not guarantee message ordering, whereas FIFO variants guarantee strict ordering and deduplication.
3
Combine the services to form an ordered fan-out pattern.
The architecture will consist of an SNS FIFO topic publishing to multiple SQS FIFO queues subscribed to it.
This pattern decouples the publisher from the subscribers while ensuring both systems receive events in the exact sequence they were generated.

Key Concept

De-coupling with Fan-Out and Message Ordering
Rate this question