igalshilman commented on a change in pull request #5: [FLINK-15769] [kafka-io]
Add configuring startup position for Kafka ingress
URL: https://github.com/apache/flink-statefun/pull/5#discussion_r373397385
##########
File path:
statefun-flink/statefun-flink-io-bundle/src/main/java/org/apache/flink/statefun/flink/io/kafka/KafkaSourceProvider.java
##########
@@ -52,6 +52,8 @@
Properties properties = new Properties();
properties.putAll(spec.properties());
properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
spec.kafkaAddress());
+ properties.put(
+ ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
spec.autoResetPosition().asKafkaConfig());
Review comment:
I think that this would override a `ConsumerConfig.AUTO_OFFSET_RESET_CONFIG`
property set in `spec.properties()` in the case the user haven't used the
`builder.withAutoResetPosition` method.
I'd propose to followup with this by making sure that calling named methods
on a builder would always override the values in the properties.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services