A simple Spring Boot (Java) app which demonstrates Apache Kafka's producer and consumer APIs.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main Made changes to format. Nov 22, 2018
.gitignore Initial commit. Nov 21, 2018
LICENSE Initial commit. Nov 21, 2018
pom.xml Made changes to format. Nov 22, 2018
readme.md Initial commit. Nov 21, 2018

readme.md

Simple Kafka Producer

Kafka Topic

thetechcheck

Creating a 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.