Let's not go into deep questioning what Kafka and Zookeeper is? If you are here you are already learning about it or working on it. Let's move to the head of this article "Install Kafka WITH Zookeeper Easily"
Here I am going to Install Kafka and Zookeeper using Standard User Account and with Admin privillage. (I know in work env you don't have access to Admin Privillage and you have to raise a Ticket with IT)
Download Files:
Install Files:
- JAVA — Install Java Downloaded fron Adoptium.net




2. Set JAVA_HOME




2. Extract Kafka to your home directory: C:\Users\user.name\kafka



Now we launch zookeeper and kafka (please run command in the same order)
- Launch zookeeper
C:Users\navneet.kumar\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
2. Launch kafka in new Command Prompt tab

cd kafka
.\bin\windows\kafka-server-start.bat .\config\server.properties3. Create a topic


C:\Users\navneet.kumar\kafka\bin\windows\kafka-topics.bat --create --topic testing --bootstrap-server localhost:9092 --partitions 14. Send a Message

C:\Users\navneet.kumar\kafka\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic testing
5. Consume the Message



Wollah! You've successfully installed Kafka and Zookeeper on Windows without needing any admin privileges!
Issues you might face:
wmic dependency — running zookeeper or kafka can give you error like:
'wmic' is not recognized as an internal or external command, operable program or batch file.
Option 1: To solve this you can follow this article : https://kb.tiger-technology.com/wmic_windows_11
Option 2: Update kafka (C:/Users/user.name/kafka/bin/windows/kafka-server-start.bat) file with below:
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
IF [%1] EQU [] (
echo USAGE: %0 server.properties
EXIT /B 1
)
SetLocal
IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../config/log4j.properties
)
IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
rem Directly set the JVM heap options for 64-bit systems
set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
)
"%~dp0kafka-run-class.bat" kafka.Kafka %*
EndLocalwmicRemoved: Thewmiccommand that was used to determine whether the system is 32-bit or 64-bit has been completely removed.- Heap Options Hardcoded: The line that dynamically set the heap options based on the system architecture (
wmiccheck) has been replaced with a static heap size for 64-bit systems. Specifically, 1GB of heap is set for both-Xmxand-Xms.
Remember: Always run Kafka and Zookeeper in the correct order (Zookeeper first, then Kafka).
Don't forget to shut down Kafka and Zookeeper after you're done testing to free up system resources.