Replay events with subscribing event processors

Hi All,

We upgraded from axon 2.4 to 4.1, and we are using subscribing event processors. Is there a way to replay the events and build projection using subscribing event processors?

Thanks and Regards,
Soumik Sarkar


it says:

Tracking Event Processors s use their own threads and are in full control of how handling happens, although always independent of the transaction that has published the event (this transaction must have been committed). When we want to replay the events that have happened in the past (usually for read model (re)building) this is the mechanism to use.

So I guess you have to switch to tracking event processors. That’s wat has been said here a few weeks ago when I asked a similar question.

Hi Soumik and Sebastian,

It’s correct that to be able to replay events for an Event Processor, you are inclined to use the TrackingEventProcessor.
To correctly fulfill a replay with all the niceties of the framework knowing it is replaying, it is required to be aware at which point in the stream of events it is living.
The nature of a subscribing event processor is that it receives events as they happen, which makes it a push mechanism of events without knowledge of the entire stream or for that matter capabilities to retrieve a stream at a given point in time (which is also required to replay).

Hope this sheds some light on the situation.


Thanks to all for replying, but I have one more ask here. As I said, we have migrated from axon 2.4 to 4.1, we have production data present in prod DBs, before putting the axon 4.1 app, we would be migrating the evententry table to be compatible with 4.1. Lets suppose, I have enabled TrackingEventProcessing for the 4.1 app, now if I want to replay all the events how axon will be identifying the previously generated events as TEP was not there?

Hi Soumik,

I am unsure whether I follow your question here, but let me try regardless.

It seems like you think the TrackingEventProcessors are generating Events.
By default, they do not. A TrackingEventProcessors handles Events, it does not publish them.

Thus, the TrackingEventProcessors is not in charge of being aware whether the Events it is handling have been created before or after you have migrated your application to Axon 4.1.
All the TEP needs is a source to read events from, which in general is your EventStore.
If the Event Store contains events in the expected format, then it’ll read them just fine.

Hope this sheds some light on the situation.


Thanks Steven, I think I got the answer, but let me clarify my question. No, I havent thought that TEP generates events, I know it only handles the events published in event store by keeping a track of the events. I thought, TEPs keep track of only those events for which the TEPs are configured. So, I was thinking that when the app was using axon 2.4 then TEPs were not present so it couldnt keep track of those events, and on migrating to axon 4.1 how would I be able to replay.

From your answer, I conclude that, I would be able to replay all the events created by axon 2.4 and the new events created from axon 4.1 as well using TEPs. Please correct me if I’m wrong.

Hi Soumik,

Aaah thanks for the clarification, I fully understand your question now.
An Event Processor in Axon terms is allowed to read the entirety of the Event Stream, regardless from when that stream originates.

It is thus perfectly safe to migrate your application from an older Axon version to a newer version.
The Tracking Event Processor will simply start reading from the beginning of time in this scenario as there never was a Tracking Token present for it.