rkhachatryan commented on code in PR #360: URL: https://github.com/apache/flink-connector-kafka/pull/360#discussion_r4740600651
########## docs/content/docs/connectors/datastream/kafka.md: ########## @@ -244,6 +244,11 @@ Please note that the following keys will be set by the builder: for the starting offsets unless it is explicitly configured. The initializer selects the initial position, while an explicitly configured ```auto.offset.reset``` controls what happens if an initialized position later becomes unavailable. + ```OffsetsInitializer.earliest()```, ```latest()``` and ```timestamp(long)``` use ```EARLIEST```: + if the source falls behind topic retention, or is restored from a checkpoint whose offsets were + already deleted, it continues from the earliest offset still in the log instead of skipping the + remaining records. Set ```auto.offset.reset``` to ```latest``` to skip to the end of the log Review Comment: Agreed, and done in a separate commit. I added a default method, `OffsetsInitializer.resolvesConcreteOffsets()`, which returns false by default. latest, timestamp and specified return true, and both `KafkaSourceBuilder` and `DynamicKafkaSourceBuilder` skip the warning for them. earliest and committedOffsets warn as before. This adds a method to a `@PublicEvolving` interface. It's a compatible addition, but if you'd rather not grow the API in this PR, I have a version that uses an `@Internal` marker interface instead. The downside of the marker is that custom initializers can't opt in. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
