Use of the MessageStream
Thanks for you two cents there, Frank!
When it comes to the base interface, which you are essentially touching with milestone one, I don’t think we can provide it any other way. We require a solution that supports both imperative and reactive programming styles, for which some form of wrapper, in this case the MessageStream
, is our chosen solution.
Do note that you’d only touch this flow if you are using the “barest of bones” of Axon Framework’s configuration. We most definitely will provide more straightforward solutions, allowing you to utilize what you’ve been used to in Axon Framework 4.
Milestone 2 will bring back the annotation-based solution in full, for example. The annotation-based solution does not expect you to return a MessageStream
at all. From there, I do expect us to add more flavors in the future.
If anything, this feedback is valuable. I do hope you try out future (milestone) releases and keep telling us what you think 
New Question
As we are essentially killing the aggregate, the idea of the aggregate version will be removed as well. The closest thing aligning with this, is the consistency marker. The consistency marker is returned (only) when sourcing a stream of events from a set of tags. In an Event Store implementation like Axon Server, the consistency marker represents the globalIndex
of the last event that was used to form your consistency boundary (hence consistency marker).
The Event Store returns this consistency marker, so that it can be used while appending events. Appending events represent the “decisions that have been made” by the command handler. And to append those, you need to tell the event store “what you have read.”
As you may note, this is not a one-on-one mapping of the aggregate version. The aggregate version represented the aggregate sequenceNumber
that was stored in the event store. But, since there are no aggregate streams, there are no sequence numbers either. Thus, the solution is to take this marker instead.
It may take a little getting used to, as it’s part of the mind shift.
You can, if needed, retrieve the consistency marker from the ProcessingContext
. In milestone one, you can do that by doing the following:
ProcessingContext context ...
ConsistencyMarker marker = context.getResource(ConsistencyMarker.RESOURCE_KEY);