From reading the docs/wiki I gather that EventId together with an ExpectedVersion other than Any is the vehicle to achieve idempotency.
-
Is it safe to assume that in most cases the EventId is actually the CausationId, i.e. the unique identifier of the message or action that caused the appending of events to happen? From what I’ve read I’m inclined to say yes.
-
If multiple events need to be appended to the stream, do I need to use a transaction (as in the use of StartTransaction) to make sure that all or nothing is committed and not suffer the “Some of the events were previously committed” remark, or is AppendToStream(Async) already taking care of treating the whole as a transaction behind the scene? From what I’ve read I’d say AppendToStream alone is enough.
-
If multiple events need to be appended to the stream, can they all carry the same EventId? From what I’ve read I’m inclined to say yes.
Help me validate my assumptions,
Yves.