简体   繁体   English

卡夫卡动物园管理员的目的

[英]Purpose of Zookeeper in Kafka

As from the latest consumer versions of Kafka, the consumers aren't dependent on ZooKeeper. 从Kafka的最新消费者版本开始,消费者不再依赖ZooKeeper。 But " https://kafka.apache.org/ " says Kafka requires Zookeeper, so start zookeeper server. 但是“ https://kafka.apache.org/ ”表示Kafka需要Zookeeper,因此请启动Zookeeper服务器。 why is it so?. 为什么会这样? Once a topic has been created, even though I terminate Zookeeper it works. 一旦创建了主题,即使我终止了Zookeeper,它也可以工作。 So the purpose of Zookeeper is only for creating a Topic? 因此,Zookeeper的目的仅是创建一个主题? If so why not move creating Topic also to be independent of zookeeper 如果是这样,为什么不创建主题也要独立于动物园管理员

Kafka topics still require Zookeeper for electing a leader, communicating server failure, and storing the list of topics, plus some extra metadata such as replica location and topic configurations. Kafka主题仍然需要Zookeeper选出领导者,传达服务器故障并存储主题列表,以及一些额外的元数据,例如副本位置和主题配置。

From what I've heard, Confluent and the Kafka community are trying to move away from the Zookeeper dependency. 据我所知,Confluent和Kafka社区正在努力摆脱Zookeeper依赖性。 For example, the Avro Schema Registry can now use Kafka for leader election. 例如,Avro Schema Registry现在可以使用Kafka进行领导者选举。 And in Confluent Cloud, you have no access to Zookeeper at all. 在Confluent Cloud中,您根本无法访问Zookeeper。

Kafka Wiki - How does Kafka depend on Zookeeper Kafka Wiki-Kafka 如何依赖Zookeeper

The consumers are not dependent on Zookeeper as they are client-side. 消费者不依赖Zookeeper,因为它们是客户端。 Likewise with the producers. 生产者也是如此。

Zookeeper is required for the Kafka brokers themselves. Kafka经纪人本身需要Zookeeper。 Kafka brokers use Zookeeper to co-ordinate and synchronise themselves. 卡夫卡经纪人使用Zookeeper进行协调和同步。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM