As we know, we do not require to define ConcurrentKafkaListenerContainerFactory bean definition in spring boot with kafka instead we could configure them by these properties . But I could not find any properties at this link to configure errohandler / retrytemplate / commonerrorhandler / ContainerProperties. So because of this again I have to define the custom java bean definition and configure it. Do we have any alternate solution to achieve it through application.properties?
RetryTemplate
in the container factory is deprecated now that the error handlers support back off and exception classification.
With Spring Boot, all you need to do is add the CommonErrorHandler
(eg DefaultErrorHandler
as a @Bean
and Boot will automatically wired it into the factory.
If you need to modify container properties that are not supported directly as Boot properties, you can simply add Boot's container factory as a parameter to any @Bean
factory method and update the properties there.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.