Looks like you can’t combine the useEventIndexes & reorderEvents options.
Does that mean that the ordering is automatic? Or is there a chance that the events could be out of order when useEventIndexes?
Assuming using Event Indexes won’t automatically reorder (which I think is true), is this combination something that will be implemented in the future?
Thanks,
Ryan
Ryan,
there actually two kinds of reordering:
-
true reordering which can only happen in a distributed scenario (does not apply now), when you receive events with some delays.
-
reordering required to fix differences between order of how events were written compared to how they were committed.
Consider: write A to S1, write B to S2, commit B, commit A.
The perfect order is: B, A (B was committed first)
The almost perfect order is: A, B (A written first)
Without re-ordering fromStreams() while catching-up a projection will read A then B. And receive B and then A if processing live stream.
NOTE: this can only happen if you use manually started/committed transactions (or in a distributed environment)
- useEventIndexes always read events in the perfect order (it is disabled as it does not change anything)
**summary: **
For now use reordering only if item 2) is important for you. This feature is designed to be used in the future versions.
br
yuriy