Domain Events vs Integration Events
In event-driven architectures, it’s useful to distinguish between events based on their purpose: communication within the domain versus integration between bounded contexts. This distinction helps better manage coupling and system evolution. The Context When everything is modeled as “an event,” tensions emerge. A single message attempts to serve two different purposes: Communicate domain facts to coordinate reactions within the bounded context. Expose state changes as an integration contract with other bounded contexts. For example, when a product is put on sale in an e-commerce system: ...