Event sourcing is another way to implement applications using an event-driven approach, where the core of the functionality is based on the use of commands that produce events that change the system state once they have been processed.
We can think of a command as the result of a transaction executed within the system. This transaction would be different depending on factors such as the following:
- User actions
- Messages received from other applications
- Scheduled tasks performed
Applications created using an event-sourcing approach store the events associated with the executed commands. It's also worth storing the commands that produced events. This makes it possible to correlate all of them in order to get an idea of the ...