Description
In Kafka 2.7 the following method was added to AdminClient that provides this information:
public ListOffsetsResult listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets, ListOffsetsOptions options) |
where OffsetSpec can be:
- OffsetSpec.EarliestSpec
- OffsetSpec.LatestSpec
- OffsetSpec.TimestampSpec
This ticket introduces a new spec:
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.
Attachments
Issue Links
- is related to
-
KAFKA-13002 listOffsets must downgrade immediately for non MAX_TIMESTAMP specs
- Resolved
- links to
1.
|
Support max timestamp in GetOffsetShell | Resolved | Deng Ziming |