Event sourcing

This pattern helps us ensure that the service will publish an event whenever the state changes. In this pattern, we take a business entity (product, customer, and so on) as a sequence of state-changing events. The Event Store persists the events and these events are available for subscription or as other services. This pattern simplifies our tasks by avoiding the requirement to synchronize the data model and the business domain. It improves performance, scalability, and responsiveness.

The preceding diagram describes how an event would work for ORDERSERVICE: