Transactional Outbox
Problem
DB commit and Kafka publish must be atomic
Solution
Write event to outbox table in same DB transaction, relay publishes async
Implementation
Outbox table + polling relay or CDC (Debezium)
Tradeoffs
Added latency (~100ms), extra table
Failure Scenarios
Relay crash → resume from last published offset