My import for kafka is not working my spring boot version is 2.7.18

42 Views Asked by At

I tried 2.8x to 2.9x but my import for kafka is not working

these imports they are unable to find after kafka plugin

org.springframework.kafka spring-kafka 2.8.0

just tell me the version to go with ?

import org.springframework.kafka.core.DefaultKafkaConsumerFactory; import org.springframework.kafka.core.DefaultKafkaProducerFactory; import org.springframework.kafka.core.KafkaTemplate;

these are the imports

<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>2.7.18</version>

1

There are 1 best solutions below

0
Mohamed amine ben hassen On

try this : works fine with springboot 2.7.16

    <dependency>
        <groupId>org.springframework.kafka</groupId>
        <artifactId>spring-kafka</artifactId>
        <version>2.8.9</version>

    </dependency>