There is a method listOffset in KafkaAdmin API from 2.5.0 version.
This method can return offset by timestamp.
/**
* Used to retrieve the the earliest offset whose timestamp is greater than
* or equal to the given timestamp in the corresponding partition
* @param timestamp in milliseconds
*/
public static OffsetSpec forTimestamp(long timestamp) {
return new TimestampSpec(timestamp);
}
And also this method return object ListOffsetsResultInfo which has the fields offset and timestamp.
So my question is -> What timestamp in both cases API mentions?
Does it timestamp of KafkaRecord if yes -> can it work with message.timestamp.type=CreateTime ?
Or only with message.timestamp.type=LogAppendTime?