Hi everyone, I am interested in understanding how the broker performs lag calculations. Specifically, I would like to explore the possibility of improving the calculation method to use the latest stable offset instead of the latest offset.
I noticed that there might be differences between the results obtained from AdminClient.listOffsets and AdminClient.listConsumerGroupOffsets, and I believe investigating this area in the source code might shed some light on potential optimizations. Could you please guide me to the specific part of the Apache Kafka source code where the lag calculations are performed? I would greatly appreciate any insights or pointers you can provide to help me get started with my investigation. Thank you in advance for your assistance. Looking forward to hearing from you. Best regards, Henry