distributed systems
9 minIdempotency and the Transactional Outbox: Making Retries Safe
Learn why network retries create duplicate effects and how idempotency keys and an outbox close common reliability gaps.
Loading page...
distributed systems
9 minLearn why network retries create duplicate effects and how idempotency keys and an outbox close common reliability gaps.
distributed systems
18 minDesign around Kafka group churn, payment idempotency, coordination limits, sagas, CQRS, and context propagation across async boundaries.
Q&A
Q&AIdempotence describes the intended effect, not identical response bytes or status codes. POST needs an explicit deduplication contract before ambiguous retries are safe.
Idempotence describes the intended effect, not identical response bytes or status codes. POST needs an explicit deduplication contract before ambiguous retries are safe.
Q&A
Q&ARetry the whole idempotent transaction within a bounded policy, not just an arbitrary statement.
A deadlock detector aborts one transaction so another can progress. Capture lock and query evidence, then retry the whole business transaction only if its effects are safe to repeat. Use bounded attempts with jitter, consistent resource ordering, and idempotency for any external side effects.
Q&A
Q&ANo; it identifies an expected version, not a logical operation.
A committed first attempt advances the validator, so a repeat with the old validator may fail with 412. Use a separate scoped idempotency contract when retries must recover the original result.
java
9 minA transaction is only as good as the boundary you choose. Learn how service-layer design, isolation levels, and idempotent writes affect correctness in Java systems.
Q&A
Q&APreserve the logical job and intended window, not the retry start time.
A logical run names the business partition; attempt IDs name executions of that run. Commit completion with the effect when they share storage, and handle remote effects with an explicit duplicate or reconciliation protocol.
Q&A
Q&APersist the business change and an event record together, then publish the event asynchronously.
A database transaction writes both the business state and an outbox row. A separate publisher retries delivery from that durable row. This avoids the gap where a database commit succeeds but broker publication fails. Delivery can still be repeated, so consumers should deduplicate by a stable event ID.