Why does the new version of kafka consumer and producer configuration use bootstrap-servers instead of zookeeper server addresses?

Why does the new version of kafka consumer and producer configuration use bootstrap-servers
to directly configure broker list
instead of using zookeeper server addresses?
Don"t consumers and producers of the new version of kafka no longer need to get information from zookeeper?
if you use bootstrap-servers directly, don"t you want to reconfigure and restart if kafka broker is added?

Mar.31,2021

personal understanding: the new version of consumers use brokers instead of zookeeper because zookeeper should be transparent to consumers. Consumers need data in kafka, while zookeeper is needed within the kafka cluster and should not be exposed to the outside. Of course, consumers still obtain broker information through zookeeper, but this process is hidden by kafka. Semantic hiding zookeeper service


because zookeeper is about to be replaced, the kafka team no longer wants to rely on zk. At present, Kafka uses ZooKeeper to store metadata for partitions and agents, and chooses a Broker as the Kafka controller. It is hoped that by removing the dependence on ZooKeeper, Kafka will be able to manage metadata in a more scalable and robust way, realizing support for more partitions. It will also simplify the deployment and configuration of Kafka. But for now we still need Zookeeper (the latest version of kafka is 2.3.1). See https://cwiki.apache.org/conf.

Menu