Easiest way to configure usage of a PropagatingErrorHandler?

Hi folks,

What is the easiest way to configure a specific SubscribingEventProcessor to use the PropagatingErrorHandler instead of the default of LoggingErrorHandler?

I’ve tried to find examples and looked at the reference doc but cannot see any examples I can follow.

Is there a property I can set for the event processor?


Not a property, but it can be easily configured with Java, something like:

public class AxonConfig {
    public void configureProcessingGroupErrorHandling(EventProcessingConfigurer processingConfigurer) {        processingConfigurer.registerListenerInvocationErrorHandler("processorGroupName", conf -> new PropagatingErrorHandler());
1 Like

Thank you @gklijs.

It seems like PropagatingErrorHandler is an enum so I got it working using:

    public void configureProcessingGroupErrorHandling(EventProcessingConfigurer processingConfigurer) {        
                conf -> PropagatingErrorHandler.instance());

within a class I had marked as my Axon @Configuration.

@Steven_van_Beelen do you think its worth me opening an issue for a feature that allows you to configure this using a property? I don’t want to come across as if I am spamming the framework with issues :slightly_smiling_face:

1 Like

@vab2048 that’s polite of you to ask!
But, you can feel free to add any form of issue or pull request you think is feasible.
We see support like this as the valuable contributions the Framework thrives on.
So, go ahead and make an issue / PR!

Just out of curiosity concerning the implementation, but I assume you mean defining the ErrorHandler per Event Processor based on the ErrorHandler's bean name?

I was thinking the same way we are able to customise the mode of a processor like this:

we could customise the handlers:

But I can see that the actual implementation would be more complicated than I initially thought (from what you have said).

Now that I am familiar with it, I quite like using the Java configuration above so no need for the feature request :slight_smile:


Alright, that’s good to know!
Then I’ll assume I won’t be seeing an issue and/or pull request for this soon. :slight_smile:
Nonetheless, as stated, you should feel free to add issues and/or pull requests whenever you like!