kafka 消费者(通过新消费者 api 创建)的偏移量和滞后设置为未知
Offset and lag for kafka consumer (created via new consumer api) are set to unknown
我经常看到卡夫卡消费者获取当前偏移量和滞后设置为未知的问题
较早的消费者有偏移和滞后
GROUP, TOPIC, PARTITION, CURRENT OFFSET, LOG END OFFSET, LAG, OWNER
G.AB_KAFF, T.AB_KAFF, 0, 3, 6, 3, consumer-2
G.AB_KAFF, T.AB_KAFF, 1, 8, 11, 3, consumer-2
当我几天后再次订阅这个消费者时,它的偏移量和滞后设置为未知
GROUP, TOPIC, PARTITION, CURRENT OFFSET, LOG END OFFSET, LAG, OWNER
G.AB_KAFF, T.AB_KAFF, 0, unknown, 7, unknown, consumer-2
G.AB_KAFF, T.AB_KAFF, 1, unknown, 11, unknown, consumer-2
由于我取消了整个消费者组对主题的订阅,kafka 是否会删除该消费者以前的偏移量?
Is kafka removing previous offsets for that consumer since I am
unsubscribing whole consumer group from topic ?
是的,你是对的。
offsets.retention.minutes=1440 (24 hours)
默认为 24 小时。
偏移量主题
的日志保留时间 window(以分钟为单位)
我经常看到卡夫卡消费者获取当前偏移量和滞后设置为未知的问题
较早的消费者有偏移和滞后
GROUP, TOPIC, PARTITION, CURRENT OFFSET, LOG END OFFSET, LAG, OWNER
G.AB_KAFF, T.AB_KAFF, 0, 3, 6, 3, consumer-2
G.AB_KAFF, T.AB_KAFF, 1, 8, 11, 3, consumer-2
当我几天后再次订阅这个消费者时,它的偏移量和滞后设置为未知
GROUP, TOPIC, PARTITION, CURRENT OFFSET, LOG END OFFSET, LAG, OWNER
G.AB_KAFF, T.AB_KAFF, 0, unknown, 7, unknown, consumer-2
G.AB_KAFF, T.AB_KAFF, 1, unknown, 11, unknown, consumer-2
由于我取消了整个消费者组对主题的订阅,kafka 是否会删除该消费者以前的偏移量?
Is kafka removing previous offsets for that consumer since I am unsubscribing whole consumer group from topic ?
是的,你是对的。
offsets.retention.minutes=1440 (24 hours)
默认为 24 小时。
偏移量主题