Duplicate Events
Cheat sheet · https://pcornel.dk/topic.php?topic=5328
Answer
Multiple deliveries representing the same logical producer event and the operational controls used to recognize, suppress or safely reprocess them.
Remember
- Duplicate delivery ≠ producer bug; at-least-once systems intentionally trade duplicates for delivery reliability.
- Same payload ≠ same event identity; distinct events can legitimately contain identical values.
- Same event ID ≠ same attempt metadata; each delivery can have separate timing and response evidence.
- Duplicate suppressed ≠ downstream state correct; the first processing attempt may have failed after dedupe was marked complete.
First checks
- Duplicate counter metric — observability
- Dedup window size — coverage
- Out-of-order handling — sequence
Verify in this order
duplicate delivery → dedup → ignored
Where it usually breaks
Duplicate detection proves repeated delivery identity; it does not prove the original processing completed successfully.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload. Preserve at least three independent checks: prerequisite/interface or identity/transport state; the owning control/service/policy state; then effective data-plane, backend or workload state. A healthy upstream boundary does not prove the downstream consumer or return path.
Duplicate Events webhook boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Source / delivery | Event, subscription, delivery ID and attempt metadata are attributable | Missing source event, stale subscription, wrong callback or delivery history gap |
| Trust / acknowledgement | Auth/signature and schema checks occur before safe acknowledgement | Unverified payload, slow handler, 2xx before durable receipt or replay weakness |
| Processing / proof | Durable dedupe/worker evidence matches downstream target state | Duplicate side effect, worker failure hidden by 2xx or no target reconciliation |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5328