Which actions should a solutions architect take to meet this requirement?
(Choose two.)
Write the messages to an Amazon DynamoDB table with the payment ID as the partition key.
Write the messages to an Amazon Kinesis data stream with the payment ID as the partition key.
Write the messages to an Amazon ElastiCache for Memcached cluster with the payment ID as the key.
Write the messages to an Amazon Simple Queue Service (Amazon SQS) queue. Set the message attribute to use the payment ID.
Write the messages to an Amazon Simple Queue Service (Amazon SQS) FIFO queue. Set the message group to use the payment ID.
Explanations:
While writing messages to a DynamoDB table with the payment ID as the partition key ensures that related data is stored together, it does not inherently preserve the order of message processing as DynamoDB does not guarantee the order of writes or reads.
Writing messages to a Kinesis data stream with the payment ID as the partition key ensures that all messages related to the same payment ID are sent to the same shard, preserving the order of those messages as they are processed sequentially within that shard.
Using Amazon ElastiCache for Memcached does not ensure message ordering, as it is primarily a caching service. It does not provide mechanisms for message queuing or ordering guarantees.
While Amazon SQS can handle message queuing, a standard SQS queue does not guarantee the order of message delivery. Therefore, it is not suitable for scenarios where message order is critical.
Using an Amazon SQS FIFO queue with the payment ID as the message group ensures that all messages sent with the same payment ID are processed in the order they were sent. FIFO queues are specifically designed to maintain the order of messages.