简体   繁体   English

如何在许多其他消费者使用的 apache kafka 集群中为我的消费者组选择 group.id?

[英]How to pick a group.id for my consumer group in an apache kafka cluster that is used by many other consumers?

We have been provided with a kafka cluster url for consuming messages, but we as the a consumer-side have multiple cluster nodes.我们已经提供了一个 kafka 集群 url 用于消费消息,但我们作为消费者端有多个集群节点。

For making sure that each message will be processed once only we are going to use a common group.id shared by our consumer group.为了确保每条消息只被处理一次,我们将使用我们的消费者组共享的公共group.id Also we will Explicitly Commit Offsets.我们还将显式提交偏移量。

My question is: how do we make sure that we will not pick a group.id that is already been used by other consumer groups?我的问题是:我们如何确保我们不会选择已经被其他消费者群体使用的group.id Is there a naming convention followed that ensures group.id uniqueness or should we contact the Kafka cluster maintainer for this?是否遵循命名约定来确保group.id的唯一性,或者我们是否应该为此联系 Kafka 集群维护者?

There are character restrictions (like no spaces or symbols other than [_.-] group), but there is no general "convention" that is used outside of what your cluster maintainer might know.存在字符限制(例如除了[_.-]组之外没有空格或符号),但没有在集群维护者可能知道的范围之外使用的通用“约定”。

You can view all existing groups using您可以使用查看所有现有组

kafka-consumer-groups --list

Many companies get around this problem by generally setting an application's Kafka consumer group.id to the application's name.许多公司通常通过将应用程序的 Kafka 消费者group.id设置为应用程序的名称来解决此问题。

暂无
暂无

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

相关问题 Kafka消费者group.id多个消息 - Kafka consumer group.id multiple messages kafka 向所有具有相同 group.id 的消费者发送消息 - kafka send messages to all consumers that have the same group.id 如何在Structured Streaming的kafka数据源中为消费者组设置group.id? - How to set group.id for consumer group in kafka data source in Structured Streaming? 在不踢出已经运行的消费者的情况下,将使用相同 group.id 的 kafka 消费者的数量限制为 static 成员为 1? - Limit the number of kafka consumers using the same group.id to 1 with static membership without kicking out the already running consumer? 我可以设置Kafka Stream消费者group.id吗? - Can I set Kafka Stream consumer group.id? 两个具有相同group.id和相同Consumer.id的Kafka Consumer应用程序 - Two Kafka Consumer application having same group.id and same consumer.id 如何在消费者组kafka中动态添加消费者 - How to dynamically add consumers in consumer group kafka Apache Kafka:3个分区,消费组有3个消费者,每个消费者都应该是多线程的 - Apache Kafka: 3 partitions, 3 consumers in the consumer group, each consumer should be multithreaded 可以让具有相同group.id的kafka消费者分别使用不同的主题 - can kafka consumers with same group.id consume different topics separately 为什么具有相同 group.id 的两个消费者在 Kafka 中收到相同的消息 - Why two consumers with the same group.id receive the same message in Kafka
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM