kafka消费者计算机是否需要运行zookeeper? [英] Does a kafka consumer machine need to run zookeeper?

查看:716
本文介绍了kafka消费者计算机是否需要运行zookeeper?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的问题是这样的:如果我有一台运行Kafka(和zookeeper)的服务器,而另一台只使用消息的计算机,那么消费计算机也需要运行zookeeper吗?还是服务器负责所有工作?

So my question is this: If i have a server running Kafka (And zookeeper), and another machine only consuming messages, does the consumer machine need to run zookeeper too? Or does the server take care of all?

推荐答案

否.

Zookeeper在卡夫卡的角色是:

Role of Zookeeper in Kafka is:

  • 经纪人注册:(集群成员身份),具有心跳机制以使列表保持最新状态
  • 存储主题配置:存在哪些主题,每个主题有多少个分区 具有以下内容的ISR列表:副本在哪里(谁是首选领导者)? 分区
  • 选举控制器:控制器是代理之一,负责维护所有分区的领导者/从属者关系.
  • Broker registration: (cluster membership) with heartbeats mechanism to keep the list current
  • Storing topic configuration: which topics exist, how many partitions each has, where are the replicas, who is the preferred leader, list of ISR for partitions
  • Electing controller: The controller is one of the brokers and is responsible for maintaining the leader/follower relationship for all the partitions.

因此,仅kafka经纪人才需要Zookeeper.不需要在生产者或消费者方面使用Zookeper.

So Zookeeper is required only for kafka broker. There is no need to have Zookeper on the producer or consumer side.

这篇关于kafka消费者计算机是否需要运行zookeeper?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆