Initially, before using Apache Kafka for message queue dependency and configuration, a class needs to be specified. The following Maven starter dependency classes need to be included:
<dependencies>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>2.1.7.RELEASE</version>
</dependency>
</dependencies>
The preceding entries will import all the dependencies of Spring Kafka, which can be used to produce and consume from Apache Kafka topics.