A Lambda function processes ordered payment messages from one SQS FIFO message group with partial batch responses enabled; its handler can atomically deduplicate payments by transaction ID. If a message fails after earlier messages succeed, which handling preserves order, avoids unnecessary retries, and prevents duplicate charges on redelivery?
Show the answer
Correct answerD. Stop processing; report the failed and unprocessed messages; deduplicate payments by transaction ID.
AWhy not this: Continuing after a failure can process later messages in the group before the failed message succeeds.
BWhy not this: FIFO ordering does not prevent a message from being processed again; payment handling must remain idempotent.
CWhy not this: Reporting earlier successful messages causes unnecessary retries, even if deduplication prevents duplicate charges.
DWhy this is right: Stopping preserves order, selective failure reporting avoids retrying successes, and deduplication protects against redelivery.
For a FIFO batch, stop after the first failure and report the failed and unprocessed messages to preserve order without retrying earlier successes. Idempotent payment handling is still required because FIFO queues do not make Lambda processing exactly once.