[
https://issues.apache.org/jira/browse/FLINK-32307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18076717#comment-18076717
]
Jayesh Lalwani commented on FLINK-32307:
----------------------------------------
Gunnar,
THe
[documentation|https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/kafka/#start-reading-position]
that you linked to is for the TableAPI. The documentation for Datastream API
is [here.
|https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/kafka/]It
correctly says "If offsets initializer is not specified,
*OffsetsInitializer.earliest()* will be used by default". The default option
for Table API is
[here](https://github.com/apache/flink-connector-kafka/blob/main/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaConnectorOptions.java#L153)
> Incorrect docs for default behavior of "scan.startup.mode" option
> -----------------------------------------------------------------
>
> Key: FLINK-32307
> URL: https://issues.apache.org/jira/browse/FLINK-32307
> Project: Flink
> Issue Type: Technical Debt
> Components: Connectors / Kafka
> Reporter: Gunnar Morling
> Priority: Major
>
> The [Kafka connector
> docs|https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/kafka/#start-reading-position]
> say this in regards to the {{scan.startup.mode}} option:
> {quote}
> The default option value is group-offsets which indicates to consume from
> last committed offsets in ZK / Kafka brokers.
> {quote}
> Whereas what I actually observe is that the "earliest-offset" mode is used
> when not specifying a value for this option. This matches the implementation
> in
> [{{KafkaSourceBuilder}}|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/KafkaSourceBuilder.java#L106]
> from a quick glimpse.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)