Why does kafka producer take a broker endpoint when being initialized instead of the zk

前端 未结 4 1492
天命终不由人
天命终不由人 2021-01-31 15:43

If I have multiple brokers, which broker should my producer use? Do I need to manually switch the broker to balance the load? Also why does the consumer only need a zookeeper en

4条回答
  •  梦谈多话
    2021-01-31 16:16

    Kafka Producer API does not interact directly with Zookeeper. However, the High Level Consumer API connects to Zookeeper to fetch/update the partition offset information for each consumer. So, the consumer API would fail if it cannot connect to Zookeeper.

提交回复
热议问题