gpt4 book ai didi

apache-kafka - 消费者小组协调员和消费者小组负责人之间的卡夫卡有什么区别?

转载 作者:行者123 更新时间:2023-12-03 14:35:06 25 4
gpt4 key购买 nike

我看到了有关Kafka消费者小组协调员和消费者小组负责人的信...

  • 有什么区别?
  • 将组管理分为两组不同的职责有什么好处?
  • 最佳答案

    消费者组协调员是经纪人之一,而组长是消费者组中的消费者之一。
    组协调员不过是从消费者组的所有消费者接收心跳(或轮询消息)的经纪人之一。每个消费者群体都有一个小组协调员。如果消费者停止发送心跳,则协调器将触发重新平衡。
    摘自“Kafka The Definitive Guide” [Narkhede,Shapira和Palino,2017年]:

    When a consumer wants to join a consumer group, it sends a JoinGrouprequest to the group coordinator. The first consumer to join the groupbecomes the group leader. The leader receives a list of allconsumers in the group from the group coordinator (this will includeall consumers that sent a heartbeat recently and are thereforeconsidered alive) and it is responsible for assigning a subset ofpartitions to each consumer. It uses an implementation of thePartitionAssignor interface to decide which partitions should behandled by which consumer.

    [...] After deciding on the partition assignment, the consumer leader sendsthe list of assignments to the GroupCoordinator which sends thisinformation to all the consumers. Each consumer only sees his ownassignment - the leader is the only client process that has the fulllist of consumers in the group and their assignments. This processrepeats every time a rebalance happens.

    关于apache-kafka - 消费者小组协调员和消费者小组负责人之间的卡夫卡有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42015158/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com