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

前端 未结 4 1547
天命终不由人
天命终不由人 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:33

    All above answers are correct in older versions of Kafka, but things have changed with arrival of Kafka 0.9.

    Now there is no longer any direct interaction with zookeeper from either the producer or consumer. Another interesting things is with 0.9, Kafka has removed the dissimilarity between High-level and Low-level APIs, since both follows a uniformed consumer API.

提交回复
热议问题