omkreddy commented on code in PR #20390: URL: https://github.com/apache/kafka/pull/20390#discussion_r2321634022
########## tools/src/main/java/org/apache/kafka/tools/VerifiableConsumer.java: ########## @@ -622,16 +631,28 @@ public static VerifiableConsumer createFromArgs(ArgumentParser parser, String[] boolean useAutoCommit = res.getBoolean("useAutoCommit"); String configFile = res.getString("consumer.config"); + String commandConfigFile = res.getString("commandConfigFile"); String brokerHostAndPort = res.getString("bootstrapServer"); Properties consumerProps = new Properties(); + if (configFile != null && commandConfigFile != null) { + throw new ArgumentParserException("Options --consumer.config and --command-config are mutually exclusive.", parser); + } if (configFile != null) { + System.out.println("Option --consumer.config has been deprecated and will be removed in a future version. Use --command-config instead."); try { consumerProps.putAll(Utils.loadProps(configFile)); } catch (IOException e) { throw new ArgumentParserException(e.getMessage(), parser); } } + if (commandConfigFile != null) { + try { + consumerProps.putAll(Utils.loadProps(res.getString(commandConfigFile))); Review Comment: this should be `consumerProps.putAll(Utils.loadProps(commandConfigFile));` ? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org