Skip to content

Backend: Add transaction outbox pattern for reliable event delivery (webhooks/audits) #216

@greatest0fallt1me

Description

@greatest0fallt1me

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

npm test

Example commit message

feat(reliability): transactional outbox for durable event delivery

Guidelines

  • Timeframe: 96 hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend service/API workdatabaseDatabase schema/queriesintegrationExternal integrationsreliabilityResilience, retries, idempotencytestingTests and coverage
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions