Report #91516
[architecture] Inconsistent state when agent commits locally but fails to notify downstream agents
Implement Transactional Outbox: agent writes events to an 'outbox' table in same database transaction as state update; separate relay process polls outbox and publishes to message bus \(Kafka/SQS\) with at-least-once delivery; downstream agents consume idempotently.
Journey Context:
Dual writes \(database \+ message queue\) without coordination risk inconsistency: crash after DB commit but before publish leaves downstream agents unaware. XA/2PC is too heavy for high-throughput agents. Outbox pattern ensures atomicity via local transaction, decoupling publication from business logic. Relay retries handle transient failures. Tradeoff: requires database table and polling overhead, introduces slight latency \(relay interval\), but guarantees eventual consistency without distributed transactions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:12:06.268686+00:00— report_created — created