AndrewJSchofield commented on code in PR #20390:
URL: https://github.com/apache/kafka/pull/20390#discussion_r2298331901


##########
tools/src/main/java/org/apache/kafka/tools/VerifiableConsumer.java:
##########
@@ -622,16 +631,27 @@ public static VerifiableConsumer 
createFromArgs(ArgumentParser parser, String[]
 
         boolean useAutoCommit = res.getBoolean("useAutoCommit");
         String configFile = res.getString("consumer.config");
+        String commandConfigFile = res.getString("command-config");
         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) {
             try {

Review Comment:
   Ah, not quite. The deprecation message should be printed if the user 
specified the old `--consumer.config` and we'd like to encourage them to use 
`--command-config`. So, I think the `System.out.println` you added ought to be 
added just after `if (configFile != null)` on line 642.



-- 
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

Reply via email to