-
Notifications
You must be signed in to change notification settings - Fork 20
Events
An event is a specific thing that has occurred in the past to an individual entity. It has an unique event type name which should be a past tense form.
Events only get added to the end of the event stream (you can conceptualise this as a stack that doesn't have a pop option)
Events are stored by the thing they occur to, rather than the type of event that the are. For example we don't have a separate table for "payments" and "standing orders" in a bank account type of system - these are just different events that occur in the life of the bank account.
Events cannot be deleted nor can their content be modified - if you need to "undo" something that has happened a reversal or undo event needs to be added to the event store
Events are appended to the specific blob for the entity to which the event pertains, serialised as JSON. The business data of the event is wrapped in an event context that adds the event type name, sequence number and other context properties.