A developer is configuring an Amazon SQS FIFO queue to process incoming order events. To ensure that duplicate orders are ignored during a 5-minute window and that orders are processed in the strict order they were received, which TWO configurations must the developer implement?
- Provide a unique MessageDeduplicationId for each sent message, or enable Content-Based Deduplication on the queue.Cevap
- Provide a MessageGroupId for each message to group related messages for ordered sequential processing.Cevap
- CConfigure the SQS Visibility Timeout to 5 minutes to prevent duplicate messages from being received.
- DInitialize the AWS SDK client inside a Lambda consumer using static, hardcoded access credentials to speed up delivery.
- EConfigure the Lambda consumer function timeout to be at least 5 minutes to allow execution context reuse to handle deduplication.
Cevap
To ensure deduplication and ordered delivery in Amazon SQS FIFO queues, the developer must configure the MessageDeduplicationId (or use Content-Based Deduplication) and provide a MessageGroupId.
The correct options are specifying a MessageDeduplicationId (or enabling Content-Based Deduplication) and providing a MessageGroupId. SQS FIFO queues require a MessageDeduplicationId to uniquely identify messages and discard duplicates within the 5-minute deduplication window. They also require a MessageGroupId to guarantee that messages belonging to the same group are processed sequentially in the order they were sent.
Adım Adım Çözüm
Anahtar Kavram
SQS FIFO Message Deduplication and Grouping