Replaying events with Kafka


I’m using Axon 3.3.5 with spring-boot and I’m trying to replay events in order to get databases sync. What I did was deleting my query db to get all the events from command db again.

My query side is configured with:

general: XSTREAM
source: kafkaMessageSource
default-topic: “events”
group-id: “bank-group”

  • localhost:9092

I tried to reset token in order to get it working, but nothing happens:

config.eventProcessorByProcessingGroup(“bankevents”, TrackingEventProcessor.class)
.ifPresent(trackingEventProcessor -> {

Any advice?

Same issue for me, looking for suggestions

I tried to delete token manually and didn’t work too.


there seems to be an issue with the KafkaTrackingToken in combination with how Kafka wants to coordinate consumers. This is being addressed at the moment.

Kind regards,


Hi Allard,

Thanks for your replay.

Can you send me the git issue? Maybe I can contribute with my logs and testing it.

I tried the 3.4-SNAPSHOT today and the problem still persist there.

Can you send me the git issue? Maybe I can contribute with my logs and testing it.

Any help here?

Hi Gustavo,

the issue isn’t fixed yet in the master branch. It has been contributed by an external developer, so we’re also dependent on his availability. I’ll ping him for the progress.



Hello Allard,

It will be fixed with 4.0 version? Do you have the git issue, so I can track and contribute there.

Hi Gustavo,

in the Axon 4.0 release, we’ve moved the Kafka connector (as well as some other connectors) to different repositories. For Kafka, this is: There is currently one open issue, which covers the replay issue as well.

The KafkaConnector has not yet been released as 4.0, as we want this issue to be resolved first.



So I am assuming this issue is fixed in version 4 as I am not seeing it in the issue list anymore. I do have a question about this KafkaTrackingToken, is it just any offset of Kafka partition , or in case of multiple partitions on the topic, how is it achieving the tracking since Kafka does not guarantee ordering among different partitions.

The Kafka related issues have moved to the Kafka extention’s repository:

Ordering across partitions will not be guaranteed. Axon will do a best-effort ordering based on timestamp.

Hope this helps.

Thanks for confirming this. I totally understand the difficulties across partitions as this is Kafka’s limitation.