Modules
Axon Framework consists of a number of modules that provide specific capabilities. Depending on the exact needs of your project, you will need to include one or more of these modules.
To not be bothered with version compatibility issues between framework and the extensions, it is recommended to use the BOM.
Axon 'Main Modules' are the modules that have been thoroughly tested and are robust enough to use in demanding production environments. The maven
groupId
of all these modules is org.axonframework
. Visit Maven Central Repository to copy coordinates for the version you need.Quick start an Axon ApplicationThe Axon Spring Boot Starter module is the quickest start in to an Axon project as it will retrieve all the required modules/dependencies transitively. Alternatively, you can manually select individual modules for a customized configuration.
Addressing thejavax
tojakarta
package name changeDuring the migration of Java EE to the Eclipse Foundation, "Eclipse and Oracle have agreed that thejavax
package namespace cannot be evolved by the Jakarta EE community". With the release of the Jakarta EE 9 Platform, thejavax
package names were officially and finally renamed asjakarta
. The change impacts a few APIs that Axon Framework uses, likeinject-api
,persistence-api
,validation-api
. Furthermore, it impacts third-party technologies often used with Axon, such as Spring and Hibernate.All code that uses the affected annotations has been updated to use thejakarta
namespace. The variants using ajavax
namespace have been deprecated. They can be found inlegacyjpa
packages across the Messaging, Modeling, Event Sourcing and Spring Boot Starter modules. Since we moved to using thejakarta
namespace by default, the-jakarta
modules introduced with 4.6.0 are no longer available. If you are using Spring auto configuration, it should still use thejavax
namespace, as long as you are using Spring Boot 2. This is done by checking theEntityManagerFactory
class provided by Spring Boot.
Module | Artifact Id | Group Id | Maven Central |
---|---|---|---|
axon-messaging | org.axonframework | ||
axon-modelling | org.axonframework | ||
axon-eventsourcing | org.axonframework | ||
axon-configuration | org.axonframework | ||
axon-test | org.axonframework | ||
axon-server-connector | org.axonframework | ||
axon-spring | org.axonframework | ||
axon-spring-boot-starter | org.axonframework | ||
axon-disruptor | org.axonframework | ||
axon-metrics | org.axonframework | ||
axon-micrometer | org.axonframework | ||
axon-legacy | org.axonframework | ||
axon-tracing-opentelemetry | org.axonframework |
This module contains all necessary components and building blocks to support command, event and query messaging.
This module contains the necessary components to create domain models, like Aggregates and Sagas.
This module contains all necessary infrastructure components to support Event Sourcing, Command and Query Models.
This module contains test fixtures that you can use to test Axon based components, such as your Command Handlers, Aggregates and Sagas. You typically do not need this module at runtime and will only need to be added to the classpath for running tests.
This module contains all the necessary components to configure an Axon application.
This module provides infrastructure components that connect to Axon Server.
This module allows Axon Framework components to be configured in the Spring Application context. It also provides a number of building block implementations specific to Spring Framework, such as an adapter for publishing and retrieving Axon Events on a Spring Messaging Channel.
This module provides Spring Boot auto-configuration for your project. It is by far the easiest option to get started as it automatically configures all Axon components. It is explained in more details here.
This module contains a specific CommandBus and Command Handling solution based on the Disruptor paradigm.
This module provides basic implementations based on Coda Hale to collect the monitoring information.
This module provides basic implementations based on Micrometer to collect the monitoring information. Micrometer is a dimensional-first metrics collection facade whose aim is to allow you to time, count, and gauge your code with a vendor neutral API.
This module contains components that enable migration of older Axon projects to use the latest Axon version.
Besides main modules, there are several extension modules which complement Axon Framework. They address distribution concerns of Axon Framework towards non-Axon Server solutions. The maven
groupId
of these extensions starts with org.axonframework.extensions.*
. Visit Maven Central Repository to copy coordinates for the version you need.Module | Artifact Id | Group Id | Maven Central | GitHub |
---|---|---|---|---|
axon-amqp | org.axonframework.extensions.amqp | |||
axon-amqp-spring-boot-starter | org.axonframework.extensions.amqp | |||
axon-cdi | org.axonframework.extensions.cdi | |||
axon-jgroups | org.axonframework.extensions.jgroups | |||
axon-jgroups-spring-boot-starter | org.axonframework.extensions.jgroups | |||
axon-kafka | org.axonframework.extensions.kafka | |||
axon-kafka-spring-boot-starter | org.axonframework.extensions.kafka | |||
axon-kotlin | org.axonframework.extensions.kotlin | |||
axon-mongo | org.axonframework.extensions.mongo | |||
axon-mongo-spring-boot-starter | org.axonframework.extensions.mongo | |||
axon-reactor | org.axonframework.extensions.reactor | |||
axon-springcloud | org.axonframework.extensions.springcloud | |||
axon-springcloud-spring-boot-starter | org.axonframework.extensions.springcloud | |||
axon-tracing | org.axonframework.extensions.tracing | |||
axon-tracing-spring-boot-starter | org.axonframework.extensions.tracing |
This module provides components that allow you leverage an AMQP-based message broker as an Event Message distribution mechanism. This allows for guaranteed-delivery, even when the Event Handler node is temporarily unavailable.
This module provides Spring auto-configuration on top of the
axon-amqp
module.This module provides support for Contexts and Dependency Injection (CDI) for the Java EE platform.
This module provides integration with JGroups for command distribution. JGroups should be regarded as a reliable messaging toolkit.
This module provides Spring auto-configuration on top of the
axon-jgroups
moduleThis module provides Spring auto-configuration on top of the
axon-kafka
module.This module provides a set of reified operations, among others, to allow a cleaner Kotlin coding experience when using Axon.
This module provides event and saga store implementations that store event streams and sagas in a MongoDB database. MongoDB is a document based NoSQL database.
This module provides Spring auto-configuration on top of the
axon-mongo
module.This module provides integration with Spring Cloud for command distribution. Spring Cloud provides an API for common distributed system patterns.
This module provides Spring auto-configuration on top of the
axon-springcloud
moduleThis module provides support for distributed tracing of Axon applications. The Open Tracing standard is used to provide the tracing capabilities.
This module provides Spring auto-configuration on top of the
axon-tracing
moduleIn addition to the main framework modules and the extensions, Axon also has a Bill of Materials, or BOM. The BOM is provided to ensure the use of compatible framework and extension dependencies inside an Axon application. As such, it is the recommended approach towards defining the overall Axon version used inside of an application.
For using the BOM, you would add the
axon-bom
dependency to your dependency management system:Maven
Gradle
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.axonframework</groupId>
<artifactId>axon-bom</artifactId>
<version>${version.axon}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...
</dependencies>
</dependencyManagement>
...
For usage with Gradle Version 4.x and below, apply the dependency-management-plugin like so:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:0.5.1.RELEASE"
}
}
apply plugin: "io.spring.dependency-management"
After this, import the Axon BOM:
dependencyManagement {
imports {
mavenBom 'org.axonframework:axon-bom:<VERSION>'
}
}
Beginning with Gradle version 5.0, you can also omit the dependency-management plugin and instead use the
platform
dependency dsl to import maven boms:implementation(platform("org.axonframework:axon-bom:<VERSION>"))
After that is in place, you can add any of the mentioned dependencies from framework and the extensions without specifying versions. Furthermore, you will be guaranteed that the provided versions in the BOM are compatible with one another.
Last modified 3mo ago