Question

Difficulty: HardDecoupling Architectures and Event-Driven Messaging

A smart home utility company is designing an architecture to ingest telemetry data from millions of smart meters. The telemetry readings from each individual smart meter must be processed in the exact chronological order in which they are generated. Additionally, the architecture must fan out these readings to two separate backend applications: a real-time billing service and an anomaly detection engine. Which combination of actions should the solutions architect recommend to decouple these services while preserving message ordering? (Select TWO.)

  1. Publish the smart meter telemetry readings to an Amazon SNS FIFO topic, using the unique smart meter identifier as the Message Group ID.Answer
  2. Create two separate Amazon SQS FIFO queues—one for the billing service and one for the anomaly detection engine—and subscribe both queues to the SNS FIFO topic.Answer
  3. C
    Publish the smart meter telemetry readings to a standard Amazon SNS topic, and subscribe standard Amazon SQS queues to decouple the consumer services.
  4. D
    Direct the smart meters to send readings to an Amazon EventBridge event bus, and configure two standard Amazon SQS queues as targets for the event rules.
  5. E
    Publish the readings to an Amazon Kinesis Data Stream, and configure a standard Amazon SQS queue as a target for an Amazon Kinesis Data Firehose delivery stream to distribute messages.

Answer

The correct solution is to publish the smart meter telemetry readings to an Amazon SNS FIFO topic using the unique smart meter identifier as the Message Group ID, and to create two separate Amazon SQS FIFO queues subscribed to the SNS FIFO topic.
To achieve both decoupling (fan-out) and strict chronological ordering per device, the architecture must use Amazon SNS FIFO in combination with Amazon SQS FIFO queues. When publishing messages to the SNS FIFO topic, the unique smart meter identifier is designated as the Message Group ID. This ensures that all readings from a single device are kept in sequence. By subscribing separate SQS FIFO queues for the billing service and the anomaly detection engine to the SNS FIFO topic, each consumer application receives an independent copy of the message stream while strictly preserving the FIFO ordering within each device's message group.

Step-by-Step Solution

1
Select a message ingestion and fan-out mechanism that preserves ordering.
Amazon SNS FIFO is selected as it guarantees first-in, first-out ordering and message deduplication while allowing multiple subscribers.
Standard SNS topics do not guarantee message order, which is a key requirement of the scenario.
2
Configure the message grouping strategy.
The unique smart meter identifier is used as the Message Group ID.
This ensures that messages originating from the same physical meter are processed sequentially, while allowing parallel processing across different meters.
3
Decouple downstream consumers without losing the order guarantee.
Two SQS FIFO queues are created and subscribed to the SNS FIFO topic.
SNS FIFO topics can only fan out messages to SQS FIFO queues if end-to-end ordering needs to be maintained for the decoupled consumer services.

Key Concept

End-to-End FIFO Ordering in Decoupled Event-Driven Architectures
Rate this question