Maven is a popular choice for Kafka projects in Java
Before developing Kafka producers and consumers in Java, we’ll have to set up a simple Kafka Java project that includes common dependencies that we’ll need, namely:- Kafka dependencies
- Logging dependencies
Creating a Maven project with pom.xml and setting up dependencies
In IntelliJ IDEA, create a new Java maven project (File > New > Project)

**pom.xml**
file. The pom.xml
is a default XML file that carries all the information regarding the GroupID, ArtifactID, as well as the Version values. The user needs to define all the necessary project dependencies in the pom.xml
file. Go to the pom.xml
file.

**<dependencies>...</dependencies>**
block within which we will define the required dependencies.
Add a dependency for Kafka client as shown below

Creating your first class
Create a java package say,io.conduktor.demos.kafka.HelloWorld

0
. This means that your Java application has run successfully.
Expand the ‘External Libraries’ on the Project panel and verify that it displays the dependencies that we added for the project in pom.xml
.
