Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A smart home automation company processes real-time state change events, such as lock and unlock actions, from millions of smart door locks globally. For security auditing compliance, the events from each individual lock must be processed in the exact sequence they are generated. During peak hours, the backend database experiences write throttling due to sudden spikes in traffic. A solutions architect needs to decouple the ingestion and processing layers to handle the spikes while guaranteeing lock-level event ordering. Which combination of actions should the solutions architect recommend to meet these requirements? (Select TWO.)

  1. Create an Amazon SNS FIFO topic to receive the lock events, and subscribe an Amazon SQS FIFO queue to the topic.Answer
  2. Configure the event generator to use the unique lock ID as the Message Group ID when publishing events to the SNS FIFO topic.Answer
  3. C
    Create a standard Amazon SQS queue to buffer the events, and configure the processing application to sort the messages by timestamp.
  4. D
    Create a standard Amazon SNS topic and subscribe multiple standard Amazon SQS queues, using Message Deduplication IDs to guarantee lock-level sequencing.
  5. E
    Configure an Amazon Kinesis Data Firehose stream to write the events directly to the database, setting a buffer interval to absorb spikes.

Answer

To decouple the ingestion and processing layers while preserving ordering, the solutions architect must use an Amazon SNS FIFO topic to receive the events and subscribe an Amazon SQS FIFO queue to it, while setting the Message Group ID to the unique lock ID.
To meet compliance requirements, events must be processed in the exact order they occurred. Creating an Amazon SNS FIFO topic and subscribing an Amazon SQS FIFO queue provides a decoupled, resilient architecture that guarantees ordered message delivery. By utilizing the unique lock ID as the Message Group ID, the system ensures that messages for a specific lock are serialized and processed in order, while multiple consumers can still process events for different locks concurrently.

Step-by-Step Solution

1
Establish an ingestion and queuing system that supports ordering.
Use Amazon SNS FIFO topics and Amazon SQS FIFO queues to decouple messaging.
FIFO services guarantee that messages are delivered in the exact order they are received, preventing out-of-order processing.
2
Configure ordering granularity per lock ID.
Use the unique lock ID as the Message Group ID when publishing events.
The Message Group ID specifies that all messages belonging to the same group (lock ID) must be processed sequentially, while allowing parallel processing for different locks to ensure high throughput.

Key Concept

Decoupled architecture using SNS FIFO and SQS FIFO with Message Group IDs to preserve ordering per logical entity.
Estimated Time:1m 30s
Rate this question