Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A shipping company is designing a system to process telemetry reports from IoT sensors installed on cargo containers. The sensors publish reports containing temperature, humidity, and location data. The processing application must handle messages asynchronously. To prevent data corruption, reports for each individual cargo container must be processed in the exact order they are received. Reports that fail to process after 5 attempts must be quarantined for investigation. Which TWO options should the solutions architect implement to meet these requirements? (Select TWO.)

  1. Create an Amazon SQS FIFO queue to buffer the reports, using the cargo container ID as the message group ID to preserve order.Answer
  2. Configure an Amazon SQS FIFO dead-letter queue (DLQ) to capture messages that fail to process after multiple retries.Answer
  3. C
    Use an Amazon SQS Standard queue to buffer the reports to ensure high throughput while preserving chronological order.
  4. D
    Configure an Amazon S3 Glacier vault to act as the dead-letter queue to store failed reports for immediate, low-latency analysis.
  5. E
    Direct the telemetry reports to an AWS Lambda function running continuously as a daemon to handle long-running container session logic.

Answer

The solutions architect should create an Amazon SQS FIFO queue, using the cargo container ID as the message group ID to preserve order, and configure an Amazon SQS FIFO dead-letter queue (DLQ) to capture failed messages.
To ensure reports for each cargo container are processed in the exact order they are received, an Amazon SQS FIFO queue is required. Using the container ID as the message group ID ensures that messages within the same container group are processed sequentially, while allowing parallel processing across different containers. Additionally, configure an Amazon SQS FIFO dead-letter queue (DLQ) to handle processing failures. A FIFO queue requires a FIFO DLQ to maintain order and receive quarantined messages after the specified retry limit is reached.

Step-by-Step Solution

1
Identify the ordering requirements of the system.
Since the reports must be processed in the exact order they were received per container, a First-In-First-Out (FIFO) messaging mechanism is required.
Standard message queues do not guarantee FIFO order, which could lead to processing telemetry data out of sequence.
2
Determine the message grouping strategy.
Use the container ID as the Message Group ID within the SQS FIFO queue.
This guarantees sequential processing for messages within the same container group while allowing concurrent processing across different container IDs.
3
Design the error handling and quarantine mechanism.
Configure an SQS FIFO dead-letter queue (DLQ) as the target for the redrive policy of the main queue.
Messages that fail to process after 5 attempts are automatically sent to the DLQ, satisfying the quarantine requirement without blocking the rest of the queue.

Key Concept

Decoupling message processing while maintaining message ordering using SQS FIFO queues and handling failures using Dead-Letter Queues (DLQs).
Rate this question