RamanVerma commented on code in PR #20: URL: https://github.com/apache/flink-connector-kafka/pull/20#discussion_r1160264888
########## flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/KafkaPartitionSplitReader.java: ########## @@ -80,11 +80,20 @@ public KafkaPartitionSplitReader( Properties props, SourceReaderContext context, KafkaSourceReaderMetrics kafkaSourceReaderMetrics) { + this(props, context, kafkaSourceReaderMetrics, () -> null); + } + + public KafkaPartitionSplitReader( + Properties props, + SourceReaderContext context, + KafkaSourceReaderMetrics kafkaSourceReaderMetrics, + Supplier<String> rackIdSupplier) { this.subtaskId = context.getIndexOfSubtask(); this.kafkaSourceReaderMetrics = kafkaSourceReaderMetrics; Properties consumerProps = new Properties(); consumerProps.putAll(props); consumerProps.setProperty(ConsumerConfig.CLIENT_ID_CONFIG, createConsumerClientId(props)); + setConsumerClientRack(consumerProps, rackIdSupplier); Review Comment: Can this be resolved in the caller (KafkaSource) and `ConsumerConfig.CLIENT_RACK_CONFIG` can be set there. The benefit would be that you do not need to change this file. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org