I found the cause of this issue, look at my comment below
this is next part of my previous question:
(Solved) Kafka 0.11.0.0 keeps reseting offset on restart
Without repeating myself, I just need to say that I have again problems with kafka 0.11.0.0 resetting offset without any reason. I don't know if it's some kind of critical bug or if I missed some important config entry.
So, after I got everything done, I didn't run any consumers for a while and offsets got reset to 0 for the group after 24h as they should. So I edited config, changed it to 30 days(result of 30*24*60) and after restarting kafka some offsets came back mysteriously. I read them all with consumer so the lag was 0 everywhere and every time after I restart kafka offsets reset to the same point. What is weird, after restarting kafka and offsets get reset somehow I can see for a few seconds that there's consumer ID connected to topics that get their offsets reset. That consumer ID shouldn't be there because it consumer was terminated long ago, it's like kafka kept some bad data about non-existent consumer with its offset and kafka keeps returning to that point. I fixed it before by creating from scratch directory with kafka data but it's not the point of using kafka to do it every few days. Unfortunately I can't put consumer code here but I can assure that it commits correctly, it worked before.
How can I fix it?
@edit I see that content of leader-epoch-checkpoint files for each topics have these wrong offsets in them.
@edit2 Changing these files does nothing, so it seems that problem is somewhere else.