Limit Axon Retry on RabbitMQ

Hi,

When axon failed to process an event it retry it again. I want to limit this. Do we have an option to set that?

Hi Kasun,

Axon doesn’t have an out-of-the-box component for this. However, you could probably implement an ErrorHandler that propagates exceptions for a limited amount of time.
You’d probably need to use a WeakHashMap to keep track of the error (counts) per message. You won’t be able to use the Unit of Work, as the processor will create a new one for each attempt.

Hope this helps.
Cheers,

Allard