I am learning Kafka Producer API, and inside tutorials, they have mentioned "bootstrap.servers" is mandatory property to specify currently running brokers(by comma-separated value). I doubted why the producer provides all the brokers' list why not the producer provide zookeeper address and port and zookeeper will identify the broker.
0
votes
3 Answers
1
votes
Below are some reasons:
- Increased Latency : Using zookeepers to talk to clients for read/write operations will cause additional latency, since zookeepers will act as mediators between clients and brokers
- Increased Resource Requirements : In Kafka, Brokers do the heavy computations for management of topics data, if zookeepers acts as mediators, they will have to deal with heavy inflow and outflow of data resulting in an increase in resource (CPU/Memory) requirements for zookeepers.
0
votes
0
votes
As of Kafka 0.9, Zookeeper is no longer required for client connections.The property used to be called zookeeper.connect
and did serve the purpose of what you say - finding the brokers
The list of brokers is stored/returned by the Kafka server designated as the Controller, the list is not returned to clients by Zookeeper
The eventual goal is to remove Zookeeper from the architecture