Monday, 19 August 2019

kafkaListenerContainerFactory in org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration required a bean of type 'org.springframework.kafka.core.ConsumerFactory' that could not be found



if you are using spring kafka support and you have a customised factory, then you may have below issue:

kafkaListenerContainerFactory in org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration required a bean of type 'org.springframework.kafka.core.ConsumerFactory' that could not be found


that because spring trying to be handy. it is handy but if you want to have a customized factory and you don't want to have a default one, then it will have this error .

solution:

add below line in your application.properties:


spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration



https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-messaging.html#boot-features-kafka

https://stackoverflow.com/questions/43142295/problems-adding-multiple-kafkalistenercontainerfactories/43142573

https://codeday.me/bug/20190411/848256.html

No comments:

Post a comment