Background
src/outbox/ implements the transactional outbox pattern (see OUTBOX_IMPLEMENTATION.md).
Under at-least-once delivery, a dispatcher crash between "send" and "mark processed" can
re-deliver a message, producing duplicate alerts/webhooks downstream.
Proposed work
- Attach a stable idempotency key to every outbox message.
- Persist a processed-keys ledger (with TTL) and short-circuit re-delivery of already-sent keys.
- Propagate the idempotency key as a header so idempotent consumers can dedupe too.
Acceptance criteria
Relevant files
src/outbox/, src/services/alert.service.outbox.ts, OUTBOX_IMPLEMENTATION.md
Background
src/outbox/implements the transactional outbox pattern (seeOUTBOX_IMPLEMENTATION.md).Under at-least-once delivery, a dispatcher crash between "send" and "mark processed" can
re-deliver a message, producing duplicate alerts/webhooks downstream.
Proposed work
Acceptance criteria
Relevant files
src/outbox/,src/services/alert.service.outbox.ts,OUTBOX_IMPLEMENTATION.md