kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun MA <mj.saber1...@gmail.com>
Subject Re: kafka 0.9 offset unknown after cleanup
Date Tue, 03 May 2016 18:46:40 GMT
Thanks for your reply. I checked the offset topic and the cleanup policy is actually compact.

Topic:__consumer_offsets	PartitionCount:50	ReplicationFactor:3 Configs:segment.bytes=104857600,cleanup.policy=compact,compression.type=uncompressed

And I’m using so the default config for log.cleaner.enable is true. 
In this case theoretically I should not lose any offset, right?
I noticed that offsets.retention.minutes by default is 24hours, which is correlated to my
offset becomes unknown, so I’m wondering if that is because of this config? Can someone
explain more about this config(description: Log retention window for offsets topic) because
I don’t understand what this does?

Another related question is that how can I actually see the data of offset topic? I think
by reading the actual data might help.


> On May 3, 2016, at 1:15 AM, Gerard Klijs <gerard.klijs@dizzit.com> wrote:
> Looks like it, you need to be sure the offset topic is using compaction,
> and the broker is set to enable compaction.
> On Tue, May 3, 2016 at 9:56 AM Jun MA <mj.saber1990@gmail.com> wrote:
>> Hi,
>> I’m using new-consumer api. I noticed that after kafka cleans up
>> all old log segments(reach delete.retention time), I got unknown offset.
>> bin/kafka-consumer-groups.sh --bootstrap-server server:9092 --new-consumer
>> --group testGroup --describe
>> testGroup, test, 0, unknown, 49, unknown, consumer-1_/
>> testGroup, test, 1, unknown, 61, unknown, consumer-1_/
>> In this situation, I cannot consume anything using new-consumer java
>> driver if I disable auto-commit.
>> I think this happens because new-consumer driver stores offset in broker
>> as a topic(not in zookeeper), and after reaching delete.retention time, it
>> got deleted and becomes unknown. And since I disabled auto-commit, it can
>> never know where it is, then it cannot consume anything.
>> Is this what happened here? What should I do in this situation?
>> Thanks,
>> Jun

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message