Moving from Tracking to Subscribing event processor for lookup tables

I made the mistake of setting up my lookup tables to be populated from a tracking processor from within the same jvm. I recognize the appropriate usage is with a subscribing event processor. That being said would I need to reset my lookup tables if I change the event processor to subscribing?


I am not an Axon developer, but I might have some input for this topic, as we have done similar migrations.

Moving from tracking to subscribing is a little bit difficult due to two reasons:

  • You don’t exactly know whether the processor is up to date. So simply switching to a subscribing processor means that you might loose data.
  • You can’t replay a subscribing event processor (there are…ways to do that, but officially it is not supported)

I recommend to check during the migration that your event processor is actually up-to-date. Select the token in the token store for the processor in question, deserialize them and check whether they are up-to-date regarding the event processor. This becomes even more difficult in case of the Axon server. If this is the case, you can continue and switch to a subscribing processor. Remove the superfluous tokens from the token store.

If this is not possible: Write a manual migration class that deletes the lookup tables, reads the whole event stream and processes it manually to rebuild the lookup tables.

Best regards



Thank you @nils-christian for sharing this insights.