Kafka Server

How to start the server in Kafka?

Apache Kafka is a publish-subscribe-based durable messaging system. A messaging system sends messages between processes, applications, and servers.

Sagar Kudu

--

Before starting, please make sure you that you have successfully installed the Kafka and the servers are running. If not please check out this tutorial.

Learn Kafka

zookeeper comes with the Kafka distribution that we have downloaded already.

After that, we are going to spin up Kafka broker, once the broker is up it registers with zookeeper.

After that zookeeper manages and monitors the health of the Kafka broker.

Zookeeper plays a vital role when you have multiple brokers.

Setting Up Kafka

Check the Complete steps + tutorial link at Github.

  • Make sure you are navigated inside the Kafka/config root directory.

Edit server.properties file

log.dirs=c:/kafka/kafka-logs

Edit zookeeper.properties file

dataDir=c:/kafka/zookeeper-data
  • Make sure you are navigated inside the Kafka root directory.

Start Zookeeper and Kafka Broker

Always start zookeeper first, also in next versions zookeeper is going to remove, then will only Kafka Server.

Startup the Zookeeper.

> Open new cmd > go to Kafka folder, then start zookeeper server and pass config file to it.

.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties

-> you can see zookeeper has been started on port #2181

Startup the Kafka Broker

-> Open new cmd > go to Kafka folder, then start Kafka broker and pass config file to it.

.\bin\windows\kafka-server-start.bat .\config\server.properties

-> you can see Kafka server is running with brokerId=0

Kafka Tutorials

Next →

Previous ←

--

--

Sagar Kudu

I am Full Stack Java Developer @ Tata Strive | Get blogs and tutorials related to the (React | Kafka | DevOps) | Connect https://www.linkedin.com/in/sagarkudu/