mimaison commented on code in PR #12046: URL: https://github.com/apache/kafka/pull/12046#discussion_r893743558
########## clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java: ########## @@ -367,9 +367,11 @@ private void warnIfPartitionerDeprecated() { List<MetricsReporter> reporters = config.getConfiguredInstances(ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG, MetricsReporter.class, Collections.singletonMap(ProducerConfig.CLIENT_ID_CONFIG, clientId)); - JmxReporter jmxReporter = new JmxReporter(); - jmxReporter.configure(config.originals(Collections.singletonMap(ProducerConfig.CLIENT_ID_CONFIG, clientId))); - reporters.add(jmxReporter); + if (config.getBoolean(ProducerConfig.AUTO_INCLUDE_JMX_REPORTER_CONFIG)) { Review Comment: Good point! I've added logic to handle this case. -- 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