This repository contains several Axon Framework 5-based sample projects to explain specific topics. Axon usage extends itself from the repositories under the Axon Framework project, as well as the tools provided by AxoniQ like Axon Server.
Each Maven module within this project represents a different sample you can use, each with its own README.md
explaining the intent and usage.
Some of these modules can actually be run, while others are a plain set-up.
The latter typically are samples that don't require to be ran for additional or much needed explanation.
If a module can be run, you may expect a docker-compose.yml to set up the infrastructure in most cases, as well as a "
Spring Boot"-based main class.
Down below is an exhaustive list of all the sample:
- Axon-Spring Template - Sample project providing the scaffolding for a simple Axon- and Spring-based application.
- Distributed Exceptions - Sample showing how to deal with exceptions in a distributed application.
- Order Fulfillment Workflow - Sample showing how to model an Order Fulfillment process with the AxoniQ Workflow Engine.
- Reset Handler - Sample showing how to reset a
PooledStreamingEventProcessor. - Serialization Avro - Sample showing usage of Apache Avro Commands/Events/Queries.
- Sequencing Policy - Sample showing how to set up a custom
SequencingPolicyto adjust the event sequence for aPooledStreamingEventProcessor. - Snapshots - Sample showing how to configure event-sourced entity snapshotting.
- Stateful Event Handler - Sample showing a stateful event handler that can be used as a replacement for sagas.
- Subscription Query - REST - Sample showing how to use Axon's subscription query cleanly in a REST-based controller.
- Subscription Query - Streaming - Sample showing how to use Axon's subscription query cleanly in a streaming-based controller.
- Workflow Saga - Sample showing a Saga-like process modelled with the AxoniQ Workflow Engine.
A few topics that used to live here as standalone samples now have more thorough, actively maintained examples in the
AxonIQ/AxonFramework repository's examples/ directory. Rather than
maintaining a second, thinner copy, we point to those instead:
- Sagas - see the
extension-workflowproject and the automation patterns inexamples/university-demo. - Multitenancy - see
examples/university-multi-tenancy-examples. - Set-based validation - see
CourseUniqueNameSetValidationinexamples/university-demo. - Upcasting / event transformation - see
examples/university-message-transformation.