-
Book Overview & Buying
-
Table Of Contents
Microservices Design Patterns in .NET - Second Edition
By :
Event sourcing is implemented to provide a single point of reference for the history of what has happened within an aggregate and, by extension, a bounded context. Earlier in this book, we discussed the use of DDD as a design pattern that helps us scope the different services that might be required as we develop our microservices application.
Events can be employed in implementing this pattern to help us model expected outcomes within our bounded contexts. Events are scoped based on the ubiquitous language established within the bounded context and informed by decisions within the domain.
Within the domain, aggregates are responsible for creating domain events, and our domain events are usually raised based on the outcome of some user action or command. It is important to note that domain events are not raised based on actions such as the following: