Domain Events

A Domain Event is a message that informs other parts within the same Bounded Context that something of significance has happened.

Domain Event indicates a state change in a Bounded Context; consumers respond by executing some business logic within the same BC.

  • Events occur naturally in domains
  • Events makes it easier to understand and manage the domain logic
  • Events (driven architecture) leads to higher levels decoupling

In this illustration, bounded context for Personal Loans is implemented as a single microservice. Multiple events are getting produced and consumed by components within the same context. Keep in mind that the components may be part of the same process or implemented as distributed components. domain-event-example