Skip to content

A simple Kafka Producer project using Spring Boot (in Java). The producer object is created using the native Java Kafka library. The properties for Zookeeper and Kafka are created using an instance of the java.util.Properties class.

License

Notifications You must be signed in to change notification settings

contactsunny/SimpleKafkaProducerSpringBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Kafka Producer

Kafka Consumer Topic

thetechcheck

Create Kafka Topic

cd into the Kafka directory, and run the following command to create a new topic:

./bin/kafka-topics.sh --create --topic thetechcheck --replication-factor 1 --partitions 1 --zookeeper localhost:2181

Running the SpringBoot application

cd into the project directory and run the following command to create a .jar file of the project:

mvn clean install

This will create a .jar file in the target directory, inside the project directory. Now to run the project, run the following command from the same project directory:

java -jar target/<name_of_jar_file>.jar

You should now be seeing the output in the terminal.

About

A simple Kafka Producer project using Spring Boot (in Java). The producer object is created using the native Java Kafka library. The properties for Zookeeper and Kafka are created using an instance of the java.util.Properties class.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages