A developer is implementing a financial ledger application where transaction updates must be processed in the exact order they are received, without duplicates. The developer configures a client application to publish transaction events to an Amazon SNS FIFO topic, which is subscribed to an Amazon SQS FIFO queue.
During testing, the developer observes that when a user performs two different transactions (a deposit followed by a withdrawal) within a -minute window, only the first transaction is successfully written to the ledger database. The second transaction message is never delivered to the SQS queue, and no errors are logged by the publisher or consumer. The SNS FIFO topic has Content-Based Deduplication disabled, and the developer is manually setting the `MessageDeduplicationId` to the user's account ID for both messages.
Which configuration change should the developer make to ensure that both transaction messages are successfully delivered and processed in the correct order?
- Set the MessageDeduplicationId to a unique transaction ID for each message, and set the MessageGroupId to the user's account ID.Answer
- BIncrease the visibility timeout of the Amazon SQS FIFO queue to at least minutes to prevent the second transaction from being hidden.
- CSet the MessageDeduplicationId to a static string like ledger_event and set the MessageGroupId to a unique transaction ID.
- DIncrease the execution timeout of the consumer application to at least minutes and configure the SQS FIFO queue to use content-based deduplication.