Major Releases
All the enhancements and features which have been introduced to our major releases of the Axon Framework are noted here.
Release 4.4
Enhancements
Axon Framework can now be used in conjunction with Spring Boot Developer Tools. You can simply achieve this by adding the required dev-tools dependency to your project.
As a partial solution to #1106, Axon Server can now be used to schedule events. Building an
AxonServerEventScheduler
as theEventScheduler
implementation as defined through the builder is sufficient to start with scheduling events through Axon Server.An
EventTrackerStatusChangeListener
can now be configured for aTrackingEventProcessor
, as was requested in #1338. It can be configured through theTrackingEventProcessorConfiguration
, allowing users to react upon status changes of each thread processing event messages.Component specific message handler interceptors can now be defined through a dedicated annotation: the
@MessageHandlerInterceptor
annotation. This annotation allows you to introduce a specific bit of logic to be invoked prior to entering the message handling function or after invocation. It for example allows the additional introduction of a@ExceptionHandler
annotation, allowing you to specifically deal with the exceptions thrown from your message handlers. The original pull request can be found under #1394. For more specifics on using this annotation, check ou the @MessageHandlerInterceptor section.Configuring a
Snapshotter
andSnapshotFilter
have been simplified in this release. Pull request #1447 shares the load of allowing for distinctSnapshotter
configuration. Issue #1391 describes the intent to the configuration of snapshot filtering to be performed on Aggregate level. The former can be configured through theConfigurer
, whereas the latter is by usage of theAggregateConfigurer
.
Bug Fixes
The
AggregateTestFixture
was incorrectly noting an old method in one of its exceptions. This has been marked and resolved in #1428.The
CommandValidator
andEventValidator
had a minor discrepancy; namely, theCommandValidator
cleared out contained commands upon starting whereas theEventValidator
didn't. Pull request #1438 resolved the problem at hand.
For a full list of all the feature request and enhancements done for release 4.4, you can check out this page.
Release 4.3
Enhancements
Aggregate Polymorphism has been introduced, allowing for an aggregate hierarchy to come naturally from a domain model. To set this up, the
AggregateConfigurer#withSubtypes(Class... aggregates)
method can be used. In a Spring environment, an aggregate class hierarchy will be detected automatically. For more details on this feature, read up on it here.An Axon application will now shutdown more gracefully than it did in the previous releases. This is achieved by marking specific methods in Axon's infrastructure components as a
@StartHandler
or@ShutdownHandler
. A 'phase' is required in those, specifying when the method should be executed. If you want to add your own lifecycle handlers, you can either register a component with the aforementioned annotations or register the methods directly throughConfigurer#onInitialize
,Configuration#onStart
andConfiguration#onShutdown
.We have introduced the
@CreationPolicy
annotation which you can add to@CommandHandler
annotated methods in your aggregate. Through this, it is possible to define if such a command handler should 'never', 'always' or 'create' an aggregate 'if-missing'. For further explanation read the Aggregate Command Handler Creation Policy section.Both the
XStreamSerializer
andJacksonSerializer
provide a means to toggle on "lenient serialization" through their builders.Various test fixture improvements have been made, such as options to register a
HandlerEnhancerDefinition
, aParameterResolverFactory
and aListenerInvocationErrorHandler
. Additionally validations have been added too, revolving around asserting scheduled events and deadline message. The Test Fixture page has been updated to define these new operations accordingly.The
TrackingEventProcessor#processingStatus
method as of 4.3 exposes more status information. The current token position, token-at-reset, is-merging and merge-completed position have been added to the set. Read the Event Tracker Status section for more specifics on this.
Bug Fixes
A
ConcurrencyException
was thrown when an aggregate was created at two distinct JVM's at the same time. AsConcurrencyException
s are typically retryable, the creation command would be issued again if aRetryScheduler
was in place. Retrying this operation is however useless and hence has been replaced for anAggregateStreamCreationException
in pull request #1333.The test fixtures for state-stored aggregates did unintentionally not allow resource injection. This problem has been resolved in pull request #1315.
The
MultiStreamableMessageSource
did not deal well with one or several exceptional streams. Hence exception handling has been improved on this matter in #1325.
For a complete list of all the changes made in 4.3 you can check out this page.
Release 4.2
Enhancements
Axon Framework applications can now use tags to support a level of 'location awareness' between Axon clients and Axon Server instances. This feature is further described here.
Axon Server already supported several contexts, but Axon Framework application could not specify to which context message should be dispatched. The Axon Server Connector has been expanded with a
TargetContextResolver
to allow just this.A new implementation of the
StreamablbeMessageSource
has been implemented: theMultiStreamableMessageSource
. This implementation allows pairing several "streamable" message sources into a single source. This can in turn be used to for example read events from several distinct contexts for a single Tracking Event Processor.Handler Execution Exception now allow application specific information to be sent back over the wire in case of a distributed set up.
The
TrackingToken
interface now provides an estimate of it's relative position in the event stream through theposition()
method.Optional
return types can now be used for Query Handling methods.
Bug Fixes
An Aggregate's
Snapshotter
was not auto configured when Spring Boot is being used, as was filed under #932.The
CommandResultMessage
was returned asnull
when using theDisruptorCommandBus
. This was solved in pull request #1169.The
ScopeDescriptor
used by theDeadlineManager
had serialization issue when a user would migrate from an Axon 3.x application to Axon 4.x. Theaxon-legacy
package has been expanded to contain legacyScopeDescriptor
s to resolve this problem.
For a full list of all features, enhancements and bugs, check out the issue tracker.
Release 4.1
Enhancements
The
TrackingEventProcessor
now has an API to split and mergeTrackingTokens
during runtime of an application. Axon Server has additions to the UI to split and merge a given Tracking Event Processor's tokens.Next to Dropwizard metrics the framework now also supports Micrometer metrics. The
MessageMonitor
interface is used to allow integration with Micrometer. Lastly, we are incredibly thankful that this has been introduced as a community contribution.Primitive types are now supported as
@QueryHandler
return types.We have introduced the
EventGateway
in a similar fashion as theCommandGateway
andQueryGateway
. As with the command and query version, theEventGateway
provides a simpler API when it comes to dispatching Events on theEventBus
.
Bug Fixes
Command and Query message priority was not set correctly for the Axon Server Connector. This issue has been addressed under bug #1004.
The
CapacityMonitor
was not registered correctly for Event Processor, which user "Sabartius" resolved under issue #961.Some exception were not reported correctly and/or clearly when utilizing the Axon Server Connector (issue marked under number #945).
We refer to this page for a full list of all the changes.
Release 4.0
Enhancements
The package structure of Axon Framework has changed drastically with the aim to provide users the option to pick and choose. For example, if only the messaging components of framework are required, one can directly depend on the
axon-messaging
package.In part with the package restructure, all components which leverage another framework to provide something extra have been given their own repository. These repositories are called the Axon Framework Extensions.
The configuration of Event Processor has been replaced and greatly fine tuned with the addition of the
EventProcessingConfigurer
.Some new defaults have been introduced in release 4.0, like a bias towards expecting a connection with Axon Server. Another important chance is the switch from defaulting to Tracking Processors instead of Subscribing Processors.
The notion of a
CommandResultMessage
has been introduced as a dedicated message towards the result of command handling.To simplify configuration and more easily overcome deprecation, the Builder pattern has been implemented for all infrastructure components.
Bug Fixes
The bugs marked for release 4.0 were issues introduced to new features or enhancements. As such they should not have impacted users in any way. Regardless, the full list can be found here.
For more details, check the list of issues here.
Last updated