[ 
https://issues.apache.org/jira/browse/KAFKA-12541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17307794#comment-17307794
 ] 

Tom Bentley commented on KAFKA-12541:
-------------------------------------

Maybe you already knew this and are in the process of writing a KIP already, 
but if not... Since this change affects a public API there's a process for 
discussing and approving such changes that's separate from the PR process. 
You'll need to open a "KIP" and start a discussion thread. For more info see 
[https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals].

> AdminClient.listOffsets should return the offset for the record with highest 
> timestamp
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12541
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12541
>             Project: Kafka
>          Issue Type: Improvement
>          Components: admin
>            Reporter: Tom Scott
>            Assignee: Tom Scott
>            Priority: Minor
>
> In Kafka 2.7 the following method was added to AdminClient that provides this 
> information:
> {panel}
> {panel}
> |{{public}} {{ListOffsetsResult listOffsets(Map<TopicPartition,OffsetSpec> 
> topicPartitionOffsets,}}
> {{                                     }}{{ListOffsetsOptions options)}}|
> [https://kafka.apache.org/27/javadoc/org/apache/kafka/clients/admin/KafkaAdminClient.html#listOffsets-java.util.Map-org.apache.kafka.clients.admin.ListOffsetsOptions-]
> where OffsetSpec can be:
>  * OffsetSpec.EarliestSpec
>  * OffsetSpec.LatestSpec
>  * OffsetSpec.TimestampSpec
>  
> This ticket introduces a new spec:
> {panel}
> {panel}
> |{{OffsetSpec.MaxTimestampSpec }}{{// this returns the offset and timestamp 
> for the record with the highest timestamp.}}|
> This indicates to the AdminClient that we want to fetch the timestamp and 
> offset for the record with the largest timestamp produced to a partition.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to