How can I disable replay completely for a processor


We have some projections on which we do not want to allow replay (time to complete is pretty high and will mess up operations of the app). The @DisallowReplay should be the straightforward way to do this, however when I use is on class level for tha classes in the specific processinggroup and initiate a replay (to test) though the axon-open-admin it still tries to reset the token for the processor (fails on our end due to a DB error).

Is there a way to completely disable the token reset for certain (or all) processors? In the classes EventHandlerInvoker, EventMessageHandler and its subclasses there is a method supportsReset(), which hint to the possibility to completely disable the token resetting.

Maybe I can’t find it online (or on this forum) but I can’t seem to figure out how (if possible) to achieve this.

Thanks in advance for the help.

Hi there Thijmen, I believe there is no way in the framework to fully disable it. The @DisallowReplay just specifies which handlers should not be taken into account while replaying.

If you’d like a projection not to be resettable, you can define a @ResetHandler in a component of the processing group, and throw an exception there. This will rollback the reset transaction.

Thanks for using Axon Open Admin btw! Always nice to see users of my lib. While at AxonIQ, I made something similar but better; Feel free to try it out!

Kind regards,

Mitchell Herrijgers

Hey Mitchell!

Thanks for the reply I’ll try that and report back!

About the Axon Inspector: am I understanding it correctly that my application will be sending metrics to Axoniq servers? Is there not a way to run the Inspector as a local instance (in a kube cluster or docker daemon?

Hello Thijmen, that is correct. There might be an on-premise version in the future, but there’s none at the moment. If that’s a problem, I’d recommend using Axon Open Admin!

For the moment that is not an option indeed, still looks very nice though!

I just wanted to share one additional thing with you, we consider what you encountered after internal discussion a bug. We already have a PR out, in which when there are no handlers that support it, will throw an exception: Prevent processors from resetting when no handlers support replay by abuijze · Pull Request #2769 · AxonFramework/AxonFramework · GitHub

1 Like