Tracking processors and Exceptions on event handlers


Is there any way to avoid moving forward the tracking processor when an exception is thrown in a @EventHandler annotated method?


There is.

You can either implement your own error handlers or use the other provided one, the PropagatingErrorHandler. Something along the lines of this, in a Spring context, should do the trick.

fun configureListenerErrorHandling(ehc: EventHandlingConfiguration) {
    ehc.configureListenerInvocationErrorHandler("ProcessingGroupName") {

The default LoggingErrorHandler just logs and ignores the message. This rethrows the exception and when it ends up in the TrackingEventProcessor, it’s going to get stuck in a retry-loop until it’s successfully handled.