Reputation: 21
I have been consuming events from kafka topic and processing the same in my application for quite sometime. The topic has 20 partitions and I set kafka concurrency as 10 , since I consume events from kafka topic with the 2 replica of my application. I set the commit mode as manual immediate , Hence I want to commit the offset of partition once application ensures the events are processed. Everything was fine, until a day when one or multiple nodes of kafka servers were down and restarted. we use 3 nodes of kafka broker. One this happens, I was happened to see that there were much of rebalancing happened in the consumer group it was kicked out and joined back continuously for some time. Then suddenly, I started noticing that each consumer ( group of 10 threads in each replica of my application) printed the log as follows
"found no committed offset for partition"
"Resetting offset to {NUMBER} for the partition {TOPIC-NUMBER}"
After this log, each consumer starts reading the earliest available ( its all committed by application a few days back) offsets from each partitions. is this normal behavior?. I tried to investigate this issue. All I found is , the following
my kafka client properties as follows
ofset.reset= earliest ( but it should not provide me committed offsets again, I guess)
heat beat interval = 2000 ms
session time out= 50000 ms
auto commit = false
I noticed similar issue was asked here earlier . But nothing concludes the issue. I mention those links here
Kafka-node suddenly consumes from offset 0
Kafka consumer: starts reading partition from the beginning even thought there's a committed offset
After kafka crashed, the offsets are lost
Kafka partitions and offsets disappeared
Upvotes: 2
Views: 7902
Reputation: 3762
This is not really an answer, more of a suggestion.
Please refer auto.offset.reset. It is stated that when a broker cannot find an offset (for some reason) and the value for auto.offset.reset is set to 'earliest' (which in your case it is), the above behavior would be seen.
Therefore, in your case,
You could check the above two possibilities or at least discount them through testing in your enquiry.
Upvotes: -2