kafka消费机器需要运行zookeeper吗? [英] Does a kafka consumer machine need to run zookeeper?

查看:60
本文介绍了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 在 Kafka 中的作用是:

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 broker 需要 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天全站免登陆