Added built-in retries to handle concurrency issues, for instance retrying on the stream version conflict.
[BREAKING]: Changed the stream read and aggregation behaviour to always return the result and never null together with a flag if the stream exists.
Now:
readStream when there's no stream will return empty events array and streamExists set to false,
aggregateStream when there's no stream will return the default state, and streamExists set to false,
Both will return the default stream position when the stream doesn't exist (for the event store, that will be -1, 0 for others).
[BREAKING]: Made Command handler signature take options object instead of an array of parameters.** This is needed to extend the command handler in the future and even now with common retry options.
Added built-in retries to handle concurrency issues, for instance retrying on the stream version conflict.
[BREAKING]: Changed the stream read and aggregation behaviour to always return the result and never
null
together with a flag if the stream exists.Now:
readStream
when there's no stream will return empty events array andstreamExists
set tofalse
,aggregateStream
when there's no stream will return the default state, andstreamExists
set tofalse
,Both will return the default stream position when the stream doesn't exist (for the event store, that will be
-1
,0
for others).Now, instead of:
you need to do: