messaging
Installation
SKILL.md
Scope
This skill owns the transport-agnostic mechanics of moving domain events between bounded contexts.
The Outbox Pattern
Never publish an event directly from application code. The write to the database and the dispatch to the broker must be atomic — otherwise a crash between them loses the event or publishes without persisting.
How It Works
- The application layer saves the aggregate and writes an outbox record in the same database transaction.
- A background process reads unpublished outbox records and forwards them to the message broker.
- On successful broker acknowledgment, the outbox record is marked as published.