A client retries a payment request after a network timeout. The server must avoid charging twice for the same logical operation. Which approach best fits?

Published
  1. Apply bounded timeouts and a circuit breaker where appropriate.
  2. Decouple producers and consumers using Pub/Sub.
  3. Use an idempotency key and persist the operation result atomically.
  4. Use a durable event identifier and idempotent consumer logic.

Comments — 0