Spring Boot Application using Kafka Consumer with Zookeeper
Spring Boot Application using Kafka Consumer with Zookeeper
Consumer consumes messages MessageObject(identifier=d7ea610b-9087-438c-9b52-1913a17ec2a9, action=SEND EMAIL)
from
producer over Kafka, and LOGs the message. Next step is to Containerize.
*Note: Java 11 is required.
conf
directory. Then cp zoo_sample.cfg zoo.cfg
dataDir
in the zoo.cfg
, as default is pointed to /tmp/data
.bin
folder../zkServer.sh start
bin
folder../zkServer.sh stop
config
folder and open server.properties
.listeners=PLAINTEXT://:9092
. This will allow Kafka broker to listen on port 9092.log.dirs
in the server.properties
.zookeeper.connect
in server.properties
defines Zookeeper properties.bin
folder../bin/kafka-server-start.sh config/server.properties
bin
folder../bin/kafka-server-stop.sh
execute ./gradlew bootRun
*Consumer works with https://github.com/cricketsamya/kafka-producer