【发布时间】:2016-02-28 19:05:24
【问题描述】:
我正在尝试找出我当前的高级消费者正在解决哪些补偿问题。我使用 Kafka 0.8.2.1,在 Kafka 的 server.properties 中设置了 no "offset.storage" - 我认为这意味着偏移量存储在 Kafka 中。 (我还通过在 Zk shell 中检查此路径来验证 Zookeeper 中没有存储偏移量:/consumers/consumer_group_name/offsets/topic_name/partition_number)
我试着听__consumer_offsets这个话题,看看哪个消费者保存了什么偏移值,但是没有用...
我尝试了以下方法:
为控制台使用者创建了一个配置文件,如下所示:
=> more kafka_offset_consumer.config
exclude.internal.topics=false
并尝试了两个版本的控制台消费者脚本:
#1:
bin/kafka-console-consumer.sh --consumer.config kafka_offset_consumer.config --topic __consumer_offsets --zookeeper localhost:2181
#2
./bin/kafka-simple-consumer-shell.sh --topic __consumer_offsets --partition 0 --broker-list localhost:9092 --formatter "kafka.server.OffsetManager\$OffsetsMessageFormatter" --consumer.config kafka_offset_consumer.config
两者都不起作用 - 它只是坐在那里但不打印任何东西,即使消费者正在积极消费/保存偏移量。
我是否缺少其他一些配置/属性?
谢谢!
码头
【问题讨论】:
标签: apache-kafka kafka-consumer-api