Why it matters
Write outbound intents in the same DB transaction as state changes.
Practical steps
- Choose storage for data outbox pattern deliberately (SQLite vs Postgres vs KV); document why.
- Implement write outbound intents in the same DB transaction as state changes with migrations that are additive and reversible where possible.
- Use transactions / idempotency keys so retries of data outbox pattern do not double-write.
- Add a fixture DB and migration test covering data outbox pattern.
- Document backup/restore touching tables used by data outbox pattern.
Watch out for
- Copy-pasting outdated snippets for data outbox pattern without re-reading current official docs.
- Shipping data outbox pattern to production without a staging rehearsal and a documented rollback.