Skip to content

Event Stream

Duncan Jones edited this page May 21, 2019 · 8 revisions

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.

Clone this wiki locally