We have released Axon Framework 5.0.0 Preview today
.
This preview contains roughly six major pointers, being:
- Full Dispatch and Handler interceptor support
- Correlation Data Support
- Event Processing fine-tuning, with flexible Sequencing Policy options
- Revised Query API
- Event Sourced Entity Spring Boot autoconfiguration
- Message Handler Spring Boot autoconfiguration
- Polish and clean up before release
The revisions on the Event Processing, Query API, and Interceptor support are in place to align with our new “Async Native API,” which revolves around the ProcessingContext and MessageStream usage throughout. As such, these changes should not directly impact you.
For Event Processing, we introduced additional means to configure the sequencing policy. We decided this to be a must with the shift to DCB, which makes defaults like the “per aggregate sequencing” unfeasible. Hence, you can now register a sequencing policy per event handling component and per event handler. If you’re using annotation, you can use the @SequencingPolicy (both method and class level) for that.
On top of aligning with the Async Native API, the QueryBus and QueryGateway have a reimagined API. This makes it so that you no longer have to deal with the ResponseType. You can instead consciously ask for a single or multiple responses on the QueryGateway, either with or without the use of a Flux. We believe this to be a simplification of Axon’s querying support that will make it easier to reason about query handling in general.
Lastly, we expanded the Spring Boot support by automatically scanning for message handlers and event-sourced entities (read: aggregates). Although not new behavior compared to Axon Framework 4, this was a task on our plate due ot the reimagined Configuration API (as of Milestone 1). For message handlers, making the classes with (e.g.) @CommandHandler annotated methods a Spring component suffices for Axon to find and register them accordingly. For event-sourced entities, you may be used to the @Aggregate annotation. This has now been replaced by the @EventSourced annotation, serving a broader purpose for the future.
As stated at the beginning, you can expect at least one release candidate from us before Axon Framework 5.0.0 will be released fully. Until that time, we would like to ask you to play around and experiment with release “5.0.0-preview”.
To ease your path into this preview release, we’ve made a new getting started guide. It’s this guide that shows the new configuration, test fixtures, stateful handlers, Axon Server with DCB, and, of course, how we imagine support for the dynamic consistency boundary for everybody. We will update the getting started with each new release to help everybody comprehend what’s been provided.
Once you have explored this or a subsequent releases, we would welcome your feedback very much! To that end, you can open a new topic under the “AF5 Milestone” category; we’ll be sure to reply there as soon as possible. We have also provided a feedback template for your convenience.
If you want to know the complete change list for this preview, please check the release notes here.
The Axon Framework team thanks everybody who will put time and energy into this milestone! Know that any input you gives us, good or bad, us very much appreciated.