Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve zookeeper host details from Kafka brokerslist

I have list of Brokers for my Kafka cluster. How can I get the zookeeper host using Brokerslist?

like image 304
MSR SW Avatar asked Sep 05 '25 22:09

MSR SW


1 Answers

If I got your question right you want to register your brokers at a zookeeper cluster. This actually works the other way round: You have to tell each broker where your zookeeper-server (or cluster) can be found. Have a look at the broker configuration setting zookeeper.connect. Together with the broker.id it will register each broker at the zookeeper cluster.

Example:

broker.id=1
zookeeper.connect=zk-host-1:2181,zk-host-2:2181,zk-host-3:2181

Hope that answers your question.

like image 137
TobiSH Avatar answered Sep 09 '25 02:09

TobiSH