I built the delivery pipeline and verified its recovery path with real Kafka, PostgreSQL and Redis containers. I stopped Kafka, submitted an event and observed HTTP 202. After restart, the same delivery succeeded and the receiver counted one HTTP 200.
The problem
A client can get a successful response even when a broker fails before a webhook is queued. That leaves the receiver waiting for an event it will never see.
The approach
The API commits the event, delivery and outbox row together in PostgreSQL. A publisher forwards pending outbox records to Kafka. Workers claim deliveries, sign webhook requests and record each attempt.
Decisions
Keep acceptance durable
The API acknowledges the database commit. Publishing can resume from the outbox when Kafka becomes available again.
Test duplicate consumption
I republished an outbox message after its delivery completed. A conditional SQL claim kept this test run to one outbound request and one attempt row.