Unable to claim token 'com.test.query[0]'. It is owned by 'xxx'

I am trying to replay few events to rebuild my projection. While resetting the token I get Unable to claim token ‘com.test.query[0]’. It is owned by ‘1@test-service-7f8589d5b9-8ctt4’ exception.
There are multiple instances running for this application. Is there any way to reset the token for all the event processors without using Axon Server?
Can we somehow get all the event processors for a projection on all the instances?

Thanks
Neha

Hi Neha,

Basically this means that the token you are trying to reset in used by another TrackingEventProcessor (TEP). A replay can only succeed if a given node can claim all the tokens at once. If you have multiple instances of a TEP running you’ll need to shut down all but one instance. After that you can reset the token. When replay is done you can start all the other instances again.
You can shutdown a TEP by invoking the shutDown method on the TrackingEventProcessor.

Cheers!

Yvonne