I understand the CommitId
is used internally by Jonathan Oliver's event store.
So far I've always provided a Guid.NewGuid()
for the CommitId
.
When would you every want to do anything different?
I don't understand why it is exposed within his common domain Repository.
Can anyone can shed some light on this?
In general, CommonDomain doesn't try to force a one-size-fits-all opinionated structure.
One way to leverage it is by having writers use their unique incoming Command Id as a CommitId - this means that competing (or retries competing with runs that have yet to time out) will get rejected with a specific exception without needing to enter into/consider/manage Conflict Resolution logic. This is used to fulfil the key tenet of Idempotent Commands.