Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cannot resolve method 'setRetryTemplate' in 'ConcurrentKafkaListenerContainerFactory'

I’m working on my Spring project using Spring Kafka module. I’m trying to setup ConcurrentKafkaListenerContainerFactory and I want to set my RetryTemplate, but there is no such method in this class. The problem is, that according to the spring documentation, there should be setRetryTemplate method, because it’s inheireted from AbstractKafkaListenerContainerFactory (AbstractKafkaListenerContainerFactory docs, ConcurrentKafkaListenerContainerFactory docs). I tried to look through sources from my IDE (Intellij Idea) and, to my surprise, didn’t find this method in AbstractKafkaListenerContainerFactory class. What should I do? I have no idea what’s wrong. Was this method removed? My Spring Boot version is 3.3.2. I’ve tried to remove spring-kafka from my pom.xml, load maven changes, add spring-kafka back and load maven changes but it’s didn’t help me.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

That Javadoc is too old and for version (2.6.3) which are out of support for years. This one is the latest: https://docs.spring.io/spring-kafka/docs/current/api/.

The RetryTemplate functionality has need replaced by the DefaultErrorHandler its BackOff settings: https://docs.spring.io/spring-kafka/reference/kafka/annotation-error-handling.html#default-eh

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading