Axon Framework logo with the

Open-source framework for event-driven microservices and domain-driven design

Why do I need to replay events?

Replaying events can prove beneficial in several scenarios. For instance when a new field should be added to the view model. You could write an update script to make the adjustment, but your application can make the update too. Simply replay the events for an Event Handler and the view-model can be created from scratch again based on all your (past) events.

Is there a BOM (Bill of Materials) that will make my life easy when using the Axon Ecosystem?

Yes, Axon provides the axon-bom which contains all the needed dependencies for your project. You can find it here.

How do I validate if a value is contained in a set when using Aggregates?

This problem can be described as “set-based consistency validation.” It requires a little extra work with DDD-based systems because an Aggregate reflects a single entity within the set. We have written a blog on the subject actually, which you can find here.

How do I replay events? And why would I do it?

To replay events in Axon Framework, you will need to access the Streaming Event Processor that processes events for your Event Handling Components. The Streaming Event Processor can reset its position on the event stream, effectively causing a replay. The reference guide has the following to say about it.

How do I handle events in an Aggregate?

In short: you cannot handle events in an Aggregate. Let’s explain it in a little more detail. With Axon, you will follow the CQRS paradigm, separating the domain model into command and query models. The Aggregate support within Axon Framework is used for the command model. Furthermore, the command model will only handle commands and publish events. The only events a command model will handle are those used to Event Source the Aggregate.

Does Axon Framework integrate with Spring Framework?

Yes, it does! In fact, Axon Framework provides a spring-boot-starter module that will set sensible defaults for you when using it with Spring.

Do I need to use Spring to use Axon Framework?

Not really. Axon Framework provides a Configuration API where you can configure all of your components without the need for Spring at all.

Can I use Axon Framework without Axon Server (Enterprise)?

Yes, you can. Axon Server is not a hard requirement for using Axon Framework.
Instead of Axon Server, you will need to configure an Event Store (e.g., an RDBMS of choice). When going for microservices, you will also need to configure a Distributed Command Bus, by using Axon’s JGroups or Spring Cloud Extension.

Can I use Axon Framework with [AMQP/Mongo/Spring Cloud/Tracing/Kafka/Reactor]?

Yes, you can. AxonIQ provides several extensions to use together with Axon Framework. You can check all of them here.

Are there any code samples?

Of course, there are. We have a dedicated repository for that. The repository contains a number of modules, each showing a different solution. By the way, you can find the repository here.