Hi Pierre, You can use kafka.tools.GetOffsetShell, which will return the earliest offset for each partition in a given topic. If you want to see the latest available ones, change "--time -2" with "--time -1"
gpaggi@kafkalog001:~$ kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list $(hostname -f):9092 --topic logs --time -2 logs:8:268728 logs:11:268544 logs:2:269047 logs:5:268855 logs:4:268919 logs:7:268781 logs:1:269115 logs:10:268636 logs:9:268676 logs:3:268962 logs:6:268812 logs:0:269176 gpaggi@kafkalog001:~$ On Tue, Jul 31, 2018 at 11:49 AM Pierre Coquentin < pierre.coquen...@gmail.com> wrote: > Hi > > How do we get the starting offset of a partition from a topic when we have > a retention policy configured? > I've checked in shell script kafka-topic.sh or kafka-console-consumer.sh > but found nothing so far. Do we have to implement our own solution to get > this information? > It could be nice in kafka-console-consumer.sh to display LOG-BEGIN-OFFSET > like > it already displays LOG-END-OFFSET. > Thanks, > > Pierre > -- Gabriele