Report #61056
[architecture] Immediate consistency requirements forcing synchronous distributed transactions across services
Use the Outbox Pattern: write domain events to an 'outbox' table in the same local transaction as business data changes; use a separate relay process \(CDC or polling publisher\) to publish events to the message bus; consumers handle eventual consistency via idempotency keys
Journey Context:
Teams attempt 2PC \(two-phase commit\) or saga orchestration for cross-service consistency, creating blocking, fragile systems. The outbox pattern ensures atomic 'save data \+ emit event' without distributed transactions. CDC \(Change Data Capture\) tools like Debezium read the binlog/wal to publish without polling overhead. Common mistake: trying to call HTTP APIs or message queues directly within a local DB transaction \(risk of inconsistency if commit fails after send\). Tradeoff: temporary inconsistency \(seconds\) vs system availability; requires compensating transactions or idempotent consumers for true rollbacks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:58:00.681439+00:00— report_created — created