Reputation: 1
I want to know the programing way of starting kafka broker and zookeeper .
I need guidance , i have tried manually starting the kafka broker and kafka zookeeper using these bewlow commands ,
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
.\bin\windows\kafka-server-start.bat .\config\server.properties
Upvotes: 0
Views: 57
Reputation: 191864
There's libraries such as Testcontainers, EmbeddedKafka, Kafka-unit, Spring-kafka-test, etc that all are meant to be used for integration testing of a Kafka broker.
Otherwise, sounds like you want ProcessBuilder to run any process - Run cmd commands through Java
Ideally, your kafka clients do not run on the same machine as the brokers, however
Upvotes: 1