-
Notifications
You must be signed in to change notification settings - Fork 20
Event Stream on Azure Table
In the Azure Table implementation the domain is used to navigate to the storage account that holds the table, the entity type is used to get the table name and the entity instance identifier is used as the partition key field for each row of the table. The second part of the key - the row key field - is the event sequence number (0 padded) and the event details are held in the non key fields of the record.
There are special fields (e.g. EventType ) for the event context information. You need to make sure that your own events do not use these property names for the business meaningful properties of the event.
public const string FIELDNAME_EVENTTYPE = "EventType";
public const string FIELDNAME_VERSION = "Version";
public const string FIELDNAME_COMMENTS = "ContextCommentary";
public const string FIELDNAME_WHO = "ContextWho";
public const string FIELDNAME_SOURCE = "ContextSource";
public const string FIELDNAME_CORRELATION_IDENTIFIER = "CorrelationIdentifier";
The record with a row key of 0000000000 is the information record that holds the current sequence number and context information for the whole event stream for the instance unique identifier. Access to this record enforces concurrency checking.
Every time a new event is to be appended to the event stream the TableEntityKeyRecord
row is updated first to store the new LastSequence
number that the new event will use as its sequence number.