Domain event
A fact the business cares about, named in the past tense (“visit booked”), that other parts of the system can react to without being called directly.
A domain event records that something happened, in the ubiquitous language of its context: “visit booked”, “invoice paid”, “profile verified”. It cannot be rejected, because it already happened. Other systems, from notifications to analytics to AI assistants, subscribe to it, so the booking code does not need to know they exist. Martin Fowler describes the pattern.
Publishing it reliably is the hard part: saving the change and sending the event in two steps is the dual-write problem, so events usually go through a transactional outbox. Once other teams consume an event, its shape is a public contract, part of an open host service. Event storming starts by listing them on a wall.
Sources
- Martin Fowler: Domain Event martinfowler.com
Related terms
- Event-driven architecture: Services publish facts such as “order placed” and others react to them, instead of services calling each other directly.
- Event storming: A workshop where business and technical people map a process as a timeline of events on sticky notes to find rules, gaps and boundaries.
- Transactional outbox: Saving an event to an outbox table in the same database transaction as the change itself, then publishing it to the broker separately.
- Aggregate (DDD): A cluster of objects changed as one unit, with a single root that enforces the business rules and marks the boundary of one transaction.
- Open host service (published language): An upstream context offers one documented, stable protocol for all consumers instead of a custom integration for each, often with a published data format.
