pyflink.datastream.connectors.kafka.KafkaOffsetsInitializer#
- class KafkaOffsetsInitializer(j_initializer: py4j.java_gateway.JavaObject)[source]#
An interface for users to specify the starting / stopping offset of a KafkaPartitionSplit.
New in version 1.16.0.
Methods
committed_offsets
([offset_reset_strategy])Get an
KafkaOffsetsInitializer
which initializes the offsets to the committed offsets.earliest
()Get an
KafkaOffsetsInitializer
which initializes the offsets to the earliest available offsets of each partition.latest
()Get an
KafkaOffsetsInitializer
which initializes the offsets to the latest offsets of each partition.offsets
(offsets[, offset_reset_strategy])Get an
KafkaOffsetsInitializer
which initializes the offsets to the specified offsets.timestamp
(timestamp)Get an
KafkaOffsetsInitializer
which initializes the offsets in each partition so that the initialized offset is the offset of the first record whose record timestamp is greater than or equals the give timestamp.