Axon Configuration - Kafka retry policies after @eventhandlers throw exception

Hi AxonIQ team,

I’ve started to use Axon 4.3.1 (latest version) in my project and remained a doubt.

OBS: I’m using SubscribingEventProcessor type as event processor.

Where I can config the kafka retry policies after @eventhandler throw an exception?

Remembering that I have @processinggroup configured. I’d like to have, on my query model project, some configs to Kafka retry auto after some time in error cases.

Can I use some Axon component to adjust this, or I could use something like spring-retry or kafka itself with internal configs?

OBS: I m using separate projects. Command model use mongo e publish events on Kafka. Query model consume events from Kafka eventbus.

Could you help me?



If you’re using a SubscribingEventProcessor, the execution is dealt with in the thread that delivers the Events. That means that retrying should also be performed by the component that delivered those events, in this case Kafka. Note that the ErrorHandling chapter you linked, describes how exceptions thrown by the Event Handler methods need to be dealt with. A few paragraphs down, it also described that exceptions in Subscribing Processors bubble up to the delivering component. They are expected to rollback and/or redeliver the message.

Kind regards,