英文:
How long would the consumer group alive after the consumers dead?
问题
-
消费者组会发生什么?它是否仍然存在?如果是的话,没有消费者加入消费者组的情况下它会存在多久?
-
我如何查看此消费者组每个分区的偏移量详情?
英文:
Let's say, I've a topic with two partitions P1, P2 and I've two consumers C1, C2 in a consumer group CG1. Now each consumer is consuming messages from one partition. Now both the consumer are dead because of some reason. In this situation,
-
what happens to the consumer group? Would it be still alive? If yes, how long would it be alive without any consumers joining the consumer group?
-
How can i see the offset details of each partition for this consumer group?
答案1
得分: 2
offsets.retention.minutes: 默认的保留期为7天,即10080
分钟,如果消费者在7天内处于非活动状态,则该消费者组的偏移量将被移除。
Checking consumer position 您可以使用以下命令查看每个分区的消费者偏移量。
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group
英文:
3.1 Broker Configs Default retention period is 7 days which is 10080
minutes, if the consumer is inactive for 7 days then offset of that consumer group will be removed
offsets.retention.minutes: After a consumer group loses all its consumers (i.e. becomes empty) its offsets will be kept for this retention period before getting discarded. For standalone consumers (using manual assignment), offsets will be expired after the time of last commit plus this retention period.
Type: intDefault: 10080 Valid Values: [1,...] Importance: highUpdate Mode: read-only
Checking consumer position you can view the consumer's offset for each partition by using following commands
bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论