SimpleEventHandlerInvoker/ErrorHandler

Hi guys,

I’m new to Axon 4.0.

Quick question: I would like to configure (Spring Boot) a PropagatingErrorHandler instead of a LoggingErrorHandler, so that Exceptions will lead to a rollback inside an event handler.

What’s the best way to do it?

Thanks,
Markus

Could answer it myself.

Add to Config:

@Bean
public ListenerInvocationErrorHandler defaultListenerInvocationErrorHandler() {
    return PropagatingErrorHandler.INSTANCE;
}