What is a domain event (an event in the domain)?
A Domain Event is a fact that happened in the domain that has business meaning and can trigger other actions.
Characteristics:
- Past tense: the event has already happened (
OrderPlaced,PaymentFailed). - Independence: the event describes a business fact, not a technical action.
- Carrying context: other parts of the system can react to it without knowing the details of its source.
Example:
After OrderPaid, delivery can be triggered automatically, or bonuses can be credited.
The point: domain events make it possible to build loosely coupled, reactive modules where logic is extended without changing the core.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.