Package io.deephaven.kafka
Interface KafkaTools.InitialOffsetLookup
- Enclosing class:
- KafkaTools
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Determines the initial offset to seek to for a given KafkaConsumer and TopicPartition.
-
Method Summary
Modifier and TypeMethodDescriptionadapt(IntToLongFunction intToLongFunction) Creates a implementation based solely on thetopic partition.longgetInitialOffset(org.apache.kafka.clients.consumer.KafkaConsumer<?, ?> consumer, org.apache.kafka.common.TopicPartition topicPartition) Returns the initial offset that theconsumershould start from for a giventopicPartition.
-
Method Details
-
adapt
Creates a implementation based solely on thetopic partition. -
getInitialOffset
long getInitialOffset(org.apache.kafka.clients.consumer.KafkaConsumer<?, ?> consumer, org.apache.kafka.common.TopicPartition topicPartition) Returns the initial offset that theconsumershould start from for a giventopicPartition.- Parameters:
consumer- the consumertopicPartition- the topic partition- Returns:
- the initial
- See Also:
-