Question

Difficulty: EasyDecoupling Architectures and Event-Driven Messaging

A retail company is launching a new flash sale application where customer transaction events are highly unpredictable and spiky. Each transaction must be processed asynchronously in the exact order it was received to ensure database consistency. Which configurations or services should a solutions architect select? (Select TWO.)

  1. Amazon SQS FIFO queues to guarantee that messages are processed in the strict order they are receivedAnswer
  2. Message Group IDs to group messages that require sequential processing within the queueAnswer
  3. C
    Amazon SQS Standard queues because they guarantee message ordering while offering higher default throughput
  4. D
    Amazon DynamoDB in provisioned capacity mode to serve as a queue buffer for the unpredictable traffic spikes

Answer

Amazon SQS FIFO queues should be used to guarantee strict first-in-first-out ordering, and Message Group IDs should be configured to group related messages for sequential processing.
To process customer transaction events in strict order, Amazon SQS FIFO (First-In-First-Out) queues must be used. SQS FIFO queues ensure that the order in which messages are sent and received is strictly preserved. Additionally, Message Group IDs are required in FIFO queues to group messages that belong to a specific session or customer, allowing multiple consumers to process different groups in parallel while maintaining FIFO ordering within each group.

Step-by-Step Solution

1
Analyze the requirement for processing events in the exact order they are received.
Identify that a message queuing service with strict ordering guarantees is required.
Standard SQS queues only provide best-effort ordering, making SQS FIFO queues the correct choice for strict ordering.
2
Determine how to handle related transactions sequentially while allowing parallel processing.
Identify that Message Group IDs should be used to group related messages.
Message Group IDs ensure that messages within the same group are processed in order, while allowing messages in different groups to be processed concurrently.

Key Concept

Decoupling with ordered messaging using SQS FIFO queues and Message Group IDs.
Rate this question