What problem does it solve?
Ensure reliable event publishing and message delivery by storing events in the same transaction as domain changes, solving the dual-write problem.
Core Features & Use Cases
- Atomic outbox integration that persists domain events alongside state changes to guarantee delivery.
- Background publisher that reads unpublished outbox messages and publishes them to the message broker or event bus.
- Idempotent handling and retry with backoff to achieve eventual consistency.
- Clear separation of concerns across Domain, Application, and Infrastructure layers.
Use Case: Imagine an e-commerce workflow where orders and related events must be published reliably even if the application crashes.
Quick Start
Start by wiring your domain events into the outbox within your unit of work, then run the OutboxPublisher in the background to deliver events reliably.