SparkSoftware / infrastructure

A .NET framework for developing CQRS and/or Event Sourced web applications.
MIT License
0 stars 1 forks source link

Detect Duplicate Events #2

Open cbaxter opened 11 years ago

cbaxter commented 11 years ago

Leverage EventVersion information to detect duplicate events.

NOTE: Can likely combine with durable message store concept required for both command/event bus implementations.

More thought required... later...

cbaxter commented 10 years ago

Currently, TimeoutDispatcher does not specify a meaningful event version for Saga Timeout events.

new EventVersion(Int32.MaxValue, 1, 1);

Version is intended to capture the aggregate version that raised the event, however that same concept does not apply to sagas. Although sagas may have an internal version for detecting concurrency conflicts, this does not translate to a saga timeout event version.

Early thoughts are that the timeout event version will require special handling and that the timeout event version may be in some way related to the timeout time itself for duplicate checking (i.e., number of seconds since start of millennium or some other structure that fits within an Int32)? May just bump EventVersion to use Int64 and store actual Ticks of timeout?

NOTE: Would use millennium over Unix Epoch to push out max date by 30 years if sticking with Int32

cbaxter commented 9 years ago

Correction to above regarding Saga Timeouts... A saga timeout will only be handled if the timeout event matches the currently scheduled saga timeout, thus duplicate timeout events are already handled (no further action required).