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!
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With