Apache Kafka Setup
Kafka is made up of two components, I am using Kafka in Windows with minimal configuration.
- Kafka
- apache-zookeeper
To visualize Kakfa we will use Kafdrop, we can visualize configured topics, stats and messages from Kafka.
Setup Apache-Zookeeper
- Download Apache Zookeeper compatible with Kafka, I am using apache-zookeeper-3.5.8-bin
- Extract contents and make the below changes in zoo.cfg under conf folder.
- Start Zookeeper by running zkServer.cmd from bin folder
Setup Kafka
- Download Kafka, I am using kafka_2.13-2.5.0
- Extract contents and make the below changes in server.properties under conf folder.
delete.topic.enable=true (add)
- Start Kafka using the below command from Kafka folder from command line
Setup Kafkadrop
- Setup maven environemt
- Download Kafkadrop
- Run the below command to create standalone package, this will create a JAR file
- Start Kafkadrop with the below command, I have Zookeper and Kafka in same machine. Replace host and IP address to required
- Kafkadrop is accessible at http://localhost:9000/
Lets create a topic and send sample message using Kafka utilities and finally we will visualize using Kafkadrop.
- Once all the above are up and running you should see the below.
- Create Topic using kafka-topics.bat from bin folder using below command.
- Push sample message to Kafka
- Visualize using Kafkadrop
Topic Stats
Messages from topic: