-
Notifications
You must be signed in to change notification settings - Fork 20
Event Stream
An event stream is the sequential history of all the events that have occurred to an entity over its life history.
Each event stream (and by logical inference each entity) is uniquely identified by the combination of three values - the domain, the entity type and the entity instance key.
For example in a retail banking situation you might have account entities identified as:-
- Bank - Account - A123456789
- Bank - Account - A234567890
and maybe branches identified as
- Bank - Branch - 901028
- Bank - Branch - 901030
The combination of these three values is used by the underlying library in order to decide which event stream to append new events to (for a command) and which event stream to run a projection over (for a query).
This combination can also be used to determine if a given entity already exists or not.
In the AppendBlob based implementation, each event stream is contained in its own blob with the path and blob name made from the combination of the domain, the entity type and the entity instance key.
For example the path for the first bank account would be:-
Bank/eventstreams/Account/A123456789.events
If the domain name, entity type or entity instance key contain characters that are not valid for an Azure blob name they are replaced with a dash (-) and the original values are stored in the named attributes of that Azure blob.