Question #1381
A logistics company's order tracking system requires messages for a specific order ID to be processed in the exact sequence they were generated. Failing to maintain this order could result in incorrect shipment status updates.
Which steps should a solutions architect implement to fulfill this requirement? (Choose two.)
Store the messages in an Amazon DynamoDB table using the order ID as the partition key.
Send the messages to an Amazon Kinesis data stream with the order ID as the partition key.
Cache the messages in an Amazon ElastiCache for Memcached cluster using the order ID as the key.
Send the messages to an Amazon Simple Queue Service (Amazon SQS) queue. Configure the message attribute to include the order ID.
Send the messages to an Amazon Simple Queue Service (Amazon SQS) FIFO queue. Set the message group ID to use the order ID.
Explanation
The requirement is to process messages for each order ID in strict sequence.
- B (Kinesis Data Stream) uses the order ID as the partition key, ensuring messages with the same order ID are stored in the same shard and processed in order.
- E (SQS FIFO Queue) uses the order ID as the message group ID, ensuring messages in the same group are processed sequentially.
Other options fail:
- A (DynamoDB) stores data but doesn't enforce processing order.
- C (ElastiCache) is a cache, not designed for ordered message processing.
- D (SQS Standard Queue) lacks FIFO guarantees, even with message attributes.
Key Points: Use Kinesis (partition keys) or SQS FIFO (message group IDs) for strict per-key ordering.
Answer
The correct answer is: BE