@@ -175,12 +175,18 @@ public class AxonConfig {
175175@Configuration
176176public class AxonConfig {
177177 // ...
178- @Autowired
179- public void configureProcessingGroupErrorHandling (EventProcessingConfigurer processingConfigurer ) {
180- // To configure a default ...
181- processingConfigurer. registerDefaultListenerInvocationErrorHandler(conf - > /* create listener error handler */ )
182- // ... or for a specific processing group:
183- .registerListenerInvocationErrorHandler(" my-processing-group" , conf - > /* create listener error handler */ );
178+ @Bean
179+ public ConfigurerModule processingGroupErrorHandlingConfigurerModule () {
180+ return configurer - > configurer. eventProcessing(
181+ processingConfigurer - > processingConfigurer. registerDefaultListenerInvocationErrorHandler(
182+ conf - > /* create listener error handler */
183+ )
184+ // ... or for a specific processing group:
185+ .registerListenerInvocationErrorHandler(
186+ " my-processing-group" ,
187+ conf - > /* create listener error handler */
188+ )
189+ );
184190 }
185191}
186192```
@@ -231,13 +237,16 @@ public class AxonConfig {
231237``` java
232238@Configuration
233239public class AxonConfig {
234- // ...
235- @Autowired
236- public void configureProcessingGroupErrorHandling (EventProcessingConfigurer processingConfigurer ) {
237- // To configure a default ...
238- processingConfigurer. registerDefaultErrorHandler(conf - > /* create error handler */ )
239- // ... or for a specific processor:
240- .registerErrorHandler(" my-processor" , conf - > /* create error handler */ );
240+ @Bean
241+ public ConfigurerModule processorErrorHandlingConfigurerModule () {
242+ return configurer - > configurer. eventProcessing(
243+ processingConfigurer - > processingConfigurer. registerDefaultErrorHandler(conf - > /* create error handler */ )
244+ // ... or for a specific processor:
245+ .registerErrorHandler(
246+ " my-processor" ,
247+ conf - > /* create error handler */
248+ )
249+ );
241250 }
242251}
243252```
0 commit comments