easymultiple choiceObjective-mapped

An event consumer sometimes processes the same SQS message more than once due to timeouts and retries. The consumer must ensure the payment is not charged twice. What design choice best addresses this requirement?

Question 1easymultiple choice
Full question →

An event consumer sometimes processes the same SQS message more than once due to timeouts and retries. The consumer must ensure the payment is not charged twice. What design choice best addresses this requirement?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Assume messages are processed exactly once because SQS uses durable storage.

SQS durability does not imply exactly-once processing. With at-least-once delivery, duplicates can occur due to retries, visibility timeout expiry, or consumer failures.

B

Best answer

Make the payment operation idempotent by using an idempotency key and skipping side effects when the key indicates the payment already succeeded.

Idempotency ensures that repeated processing attempts produce the same result. The consumer should use a stable idempotency key (for example, a business transaction ID) and record completion in durable storage. If the key already indicates the payment succeeded, the consumer skips charging again.

C

Distractor review

Increase the consumer visibility timeout to several days so messages are not redelivered.

Long visibility timeouts can reduce redelivery frequency but do not guarantee uniqueness. Failures can still lead to duplicate processing, and very long timeouts delay detection and recovery when errors occur.

D

Distractor review

Delete the message immediately even if processing fails validation.

Deleting on failure prevents retries and can lose messages that need correction. It can lead to missing payments or inconsistent outcomes rather than preventing duplicates reliably.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Related practice questions

Related SAA-C03 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SAA-C03 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: Make the payment operation idempotent by using an idempotency key and skipping side effects when the key indicates the payment already succeeded. — Because SQS is at-least-once, duplicate deliveries are expected. The most reliable approach is to make the downstream payment side effect idempotent. Use a deterministic idempotency key (for example, derived from the message’s business transaction identifier) and store the result of processing in durable storage (for example, DynamoDB). Implement logic such that if the key already indicates the payment has been completed, the consumer does not perform the charge again and instead returns successfully. This guarantees correctness even when the same message is processed multiple times. A is wrong because durable storage does not prevent duplicate processing in at-least-once systems. C is wrong because increasing visibility timeout does not provide exactly-once guarantees and can delay remediation. D is wrong because deleting messages on failed validation can cause incorrect business outcomes (missed payments) instead of safely tolerating duplicates.

What should I do if I get this SAA-C03 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.