Tracking processors and Exceptions on event handlers

hi,

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

regards

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.

@Inject
fun configureListenerErrorHandling(ehc: EventHandlingConfiguration) {
    ehc.configureListenerInvocationErrorHandler("ProcessingGroupName") {
        PropagatingErrorHandler.INSTANCE
    }
}

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.

cheers
Sebastian