In NEventStore, the boundary of consistency is a stream. Starting with version 3.2 (as @Marijn mentioned, issue # 159 ), the CommitSequence column is used to organize CommitMessages (and the contained EventMessages) when reading from a stream through all stability engines.
EventMessage ordering is guaranteed on a per-thread basis. There is no implicit ordering of messages across streams. Any actual ordering that may arise as a result, some aspect of the chosen persistence mechanism, is random and cannot be relied on.
To ensure that streamlining will strictly limit the distributed aspects of the library. Even if we considered such a function, it would have to work with all the supported stability mechanisms, including NoSQL stores.
If you are practicing Domain Driven Design, where each thread is a cumulative root, and you need to guarantee order in two or more aggregates, this indicates a design problem in your domain model.
If your forecasts should combine values ββfrom several sources (flows), you can count on an order inside the source, but you need to be flexible when ordering between sources. You should also consider the possibility of duplicate messages, especially if you are replaying through an external bus or queue.
If you try to re-order multiple threads at the end of the receiver using a timestamp (CommitStamp), this will be fragile. Timestamps have a fixed resolution (ms, tick, etc.). Even with one writer, everything can happen "at the same time."
user1010
source share