What is the need of Event Sourcing?
One major challenge about event driven architecture is atomocity. Both updating the record in database and publish an event should be done atomically.
If you take an example of creating an order for an item than there are two action
First is insert a row in database.
Second is publish Order Created event.
Both operation should be done atomically.
Solution :-
A great solution to this problem is event sourcing architectural pattern.Event sourcing as a way of storing changes in application state as a sequence of events instead of just the current state.
No comments:
Post a Comment