Installation of Apache Kafka(2023)As I discussed in the previous tutorial, Apache Kafka has several components and its architecture. Here, in the next tutorial, we will see how to install Kafka and related tools.
It is assumed that you have jdk installed in your system with proper memory location provided in the System variable named PATH.
Before installing the kafka, we need to update the System Variable named PATH variable by adding the following locations:-
C:\Windows\System32\wbem.If we do not update the PATH variable, we may get the following error-
wmic is not recognized as an internal or external command.
Installation of KafkaGo to the official downloads page of Apache Kafka kafka.apache.org and download the latest version of kafka.
We see that the zip file of the latest version gets downloaded. Now extract and unzip the file to a particular location wherever we want. We can rename the folder name to kafka.
The file after extracting would be as follows-
We can copy the path of kafka inside config -> server.properties file inside the logs command.
Similarly, the path for logs inside the zookeeper.properties file can be updated-
The installation of kafka has a predefined zookeeper installed which is used for the purpose of coordination and management of message stream like tracking kafka topics, clusters and many more..
We start the zookeeper service by the following command-
Starting the Apache KafkaWe open another command prompt and then start the Kafka broker by the following command-
We can see the default port i.e 9092 in the command logs.
Install the Graphical User Interface of the Kafka toolkafkatool is also known as the offset explorer. We go to the following url to install the kafka tool according to the operating system-
An exe file is installed in our system. We must install the offset explorer on our system.
The following wizard opens at the screen. Now click on next.
Accept the terms and conditions-
Now the setup is installed in our system.
Now open the offset explorer and click on OK to configure the connections.
We can also add the clusters in the following manner-