Description
Implement the transactional outbox pattern so DB commits and downstream dispatch (webhooks, internal events) remain consistent. This prevents losing events when the process crashes after a DB write.
Requirements and context
- Must be secure, tested, and documented.
- Must be idempotent and retry-safe.
Suggested execution
git checkout -b feature/transactional-outbox
Implement changes
- Add outbox table and worker.
- Publish outbox entries within DB transaction.
- Add tests for crash/retry behavior and idempotency.
Test and commit
Example commit message
feat(reliability): transactional outbox for durable event delivery
Guidelines
Description
Implement the transactional outbox pattern so DB commits and downstream dispatch (webhooks, internal events) remain consistent. This prevents losing events when the process crashes after a DB write.
Requirements and context
Suggested execution
Implement changes
Test and commit
npm testExample commit message
Guidelines