Concept and mechanism
When each service owns its data, writing directly to another service’s table bypasses rules and introduces schema dependency. An aggregate query can use APIs or an event-built projection, provided required freshness is explicit. Eventual consistency does not mean every delay is acceptable. Define what users can observe while an operation is pending and what happens when convergence fails. Atomicity of a local transaction does not automatically include publishing a message in another system. Failure between those two writes can leave committed data without a notification.
Guided application
In a fictional case, a reservation commits in the database but its event never reaches the next service. A transactional outbox stores the change and publication intent in one local transaction; a relay publishes later. This separation needs monitoring and allows duplicate sends. For multiple steps, a saga retains local-transaction progress and recovery actions. Compensating a reservation does not mean restoring the entire database to an old snapshot because other operations may have progressed. Define concurrency handling, irreversible actions, safe repetition, and escalation when compensation fails. Final state should be reconcilable through a business reference.
An outbox addresses the commit/publication gap but does not remove the need for idempotent consumers.
Common pitfalls
Local commit as global success; saga as automatic isolation; compensation as full restoration.
Related topics: Boundaries and contracts · Resilience and load · Messages and queues
Record intent, progress, and recovery as operational data.
Reference: Saga distributed transactions · Microservice architecture patterns and scoped platform examples; primary guidance consulted 2026-09-30