public interface ReceiverPartition
seek
operations
that can be invoked when partitions are assigned.Modifier and Type | Method and Description |
---|---|
default Long |
beginningOffset()
Return the beginning offset for this partition.
|
default Long |
endOffset()
Return the end offset for this partition.
|
long |
position()
Returns the offset of the next record that will be fetched from this topic partition.
|
void |
seek(long offset)
Seeks to the specified offset of the topic partition.
|
void |
seekToBeginning()
Seeks to the first available offset of the topic partition.
|
void |
seekToEnd()
Seeks to the last offset of the topic partition.
|
void |
seekToTimestamp(long timestamp)
Seek to the topic partition offset that is greater than or equal to the timestamp.
|
org.apache.kafka.common.TopicPartition |
topicPartition()
Returns the underlying Kafka topic partition.
|
org.apache.kafka.common.TopicPartition topicPartition()
void seekToBeginning()
void seekToEnd()
void seek(long offset)
void seekToTimestamp(long timestamp)
seekToEnd()
is performed. See
Consumer.offsetsForTimes(java.util.Map)
.timestamp
- the timestamp.long position()
@Nullable default Long beginningOffset()
Consumer.beginningOffsets(java.util.Collection)