Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Kafka as windows service

How can I install and run Apache Kafka as windows service? Right now I need to go to command prompt and start zookeeper and kafka server. Is there any way so that I can install Apache Kafka as Windows service?

I saw only below blog but don't know what they mean by "Adjusts the settings for a Windows environment" and "Build the project in Release mode" http://www.lukemerrett.com/2015/12/01/apache-kafka-windows-service-wrapper/

Thanks!

like image 928
Sam Avatar asked Mar 30 '16 13:03

Sam


People also ask

Can I install Kafka on Windows?

Yes, if you download the Kafka binaries on Windows and use commands such as kafka-topics. bat against your cluster running in WSL2, everything should work properly.


1 Answers

Perform all the pre-requisites and installation steps as specified in:
Setting Up and Running Apache Kafka on Windows OS

Complete all the steps till step 6 of section C.

(i) Use NSSM (a FREE service manager) and enter the below in Path and Arguments, to create a Windows service for ZooKeeper:
Path: <ZooKeeper directory>\bin\windows\zookeeper-server-start.bat
Arguments: <ZooKeeper directory>\config\zookeeper.properties

(ii) Use NSSM (a FREE service manager) and enter the below in Path and Arguments, to create a Windows service for Kafka:
Path: <Kafka directory>\bin\windows\kafka-server-start.bat
Arguments: <Kafka directory>\config\kafka.properties

Provide a dependency of ZooKeeper service (under the Dependencies tab in the NSSM setup of Kafka), so that when you startup Kafka service, ZooKeeper service is automatically started (if it isn't running already).

NB: Please note that ZooKeeper ships with Kafka, and the binaries to start and stop the ZooKeeper service is found in the same <Kafka directory>\bin\windows\ directory.

Hope it explains!

like image 113
SriRamS Avatar answered Sep 27 '22 16:09

SriRamS