#Kafka Demo application for producing and consuming topics
- First download kafka: https://kafka.apache.org/downloads
-
Untar the download
#tar -xvf <kafka.tar>
-
Build the project
#./gradlew jar -PscalaVersion=
-
Start zoopkeeper
#bin/zookeeper config/zookeeper.properties
-
Start broker Here I am creating 2 brokers (I have copied server.properties to 1 & 2)
#bin/kafka-server-start.sh config/server1.properties
#bin/kafka-server-start.sh config/server2.properties
-
Creating topics
#bin/kafka-topics.sh --create --bootstrap-server localhost:9093 --partitions=2 --replication-factor 2 --toipc
-
Start spring boot application
#mvn clean install -Ppersonal-repo -s