Hi huqedi, I've considered two solutions: 1) https://kafka.apache.org/24/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#endOffsets-java.util.Collection- This option requires an additional network call, so not preferable 2) Manually getting the last element of List<ConsumerRecord> in the response of the poll() I believe this option doesn't introduce considerable overhead
Let me know what you think, Thanks, Elkhan On Mon, 4 Sept 2023 at 04:03, hudeqi <16120...@bjtu.edu.cn> wrote: > Hi, Eminov. > My doubt is: how do you get the LEO of the source cluster for the > partition in `poll`? > > best, > hudeqi > > > > -----原始邮件----- > > 发件人: "Elxan Eminov" <elxanemino...@gmail.com> > > 发送时间: 2023-09-02 19:18:23 (星期六) > > 收件人: dev@kafka.apache.org > > 抄送: > > 主题: Re: Re: [DISCUSS] KIP-971 Expose replication-offset-lag > MirrorMaker2 metric > > > </elxanemino...@gmail.com>