Replaying Old Events for a New Service

When a new service is brought online I’d like to have old events (Kafka) to be replayed in order to catch up on state or rebuild state with new business logic.
This is a concept that is advertised as a benefit of EventSourcing. What is the process (possibly code sample) for making this work with the Axon Framework (Axon 4.0)?

I wanted to bump this question up.

Is this something we need to think through and engineer on our own?

KafkaMessageSource implements StreamableMessageSource, so you should be able to replay using a TrackingEventProcessor:


As you are using Kafka to distribute your messages/events you can benefit from TrackingEventPocessors and ‘rebuild’ the state, so it is supported by Axon in this case. This blog post is covering this topic with technical details: Official documentation is located here You can find my demo application here Configuring Kafka (partitions, topics, groups) is an important part as well (this is out of the scope of Axon). I hope the demo will help you…