Question

Difficulty: HardDecoupling Architectures and Event-Driven Messaging

A manufacturing company is deploying a smart assembly line where automated robotic arms perform high-precision tasks. Each arm reports telemetry status messages (such as 'calibrating', 'started', and 'completed') that must be processed in the exact order they are generated for each individual arm to maintain a digital twin representation in a database. If messages are processed out of order, the digital twin state becomes corrupt. During peak production hours, the volume of telemetry messages spikes significantly. The downstream backend consists of a fleet of worker processes running in an Auto Scaling group. Which combination of steps should a solutions architect recommend to decouple the ingestion tier from the backend workers while ensuring strict ordering per assembly arm and preventing message loss? (Select TWO.)

  1. Create an Amazon SQS FIFO queue and publish the telemetry events to it, using the assembly arm ID as the Message Group ID.Answer
  2. Configure the Auto Scaling group workers to poll the Amazon SQS FIFO queue and delete messages after they are successfully processed.Answer
  3. C
    Create a standard Amazon SQS queue and publish the telemetry events using the assembly arm ID as the Message Group ID.
  4. D
    Create an Amazon SQS FIFO queue and publish the telemetry events using the assembly arm ID as the Message Deduplication ID.
  5. E
    Configure the Auto Scaling group workers to retrieve messages from a standard Amazon SQS queue, utilizing a client-side sorting library to order messages chronologically.

Answer

To satisfy the requirements, the solutions architect should create an Amazon SQS FIFO queue, publishing telemetry events with the assembly arm ID as the Message Group ID, and configure the Auto Scaling group workers to poll the SQS FIFO queue and delete messages upon successful processing.
To decouple the ingestion tier from backend workers while maintaining message order per assembly arm, a solutions architect should use an Amazon SQS FIFO queue. By using the unique assembly arm ID as the Message Group ID, SQS FIFO ensures that all messages for that specific arm are processed sequentially in the order they were received. The workers in the Auto Scaling group should poll the queue, process the messages, and delete them upon completion. When a worker is processing a message from a specific Message Group, SQS FIFO blocks other workers from receiving messages from the same group, preventing out-of-order execution.

Step-by-Step Solution

1
Select a message queuing service that guarantees ordering and grouping.
Amazon SQS FIFO queue is chosen because standard queues do not guarantee FIFO ordering or support message grouping.
Maintaining digital twin states requires strict sequential processing per assembly arm.
2
Configure message routing parameters to segment messages by source.
Use the assembly arm ID as the Message Group ID.
This guarantees that all messages for a specific arm are processed in order, while allowing messages from different arms to be processed concurrently across multiple backend workers.
3
Configure the consumer worker processing logic.
Workers poll the FIFO queue and delete the message after successful processing.
Deleting the message releases the next message in the same Message Group for processing, preventing concurrency conflicts and ensuring reliable processing.

Key Concept

Amazon SQS FIFO queues use Message Group IDs to group messages that must be processed in order. SQS FIFO guarantees first-in, first-out delivery within each message group while allowing parallel processing across different groups.
Rate this question