You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/08/22 08:07:27 UTC

[GitHub] [kafka] zigarn commented on a diff in pull request #12175: KAFKA-14146: Config file option for MessageReader/MessageFormatter in ConsoleProducer/ConsoleConsumer (KIP-840)

zigarn commented on code in PR #12175:
URL: https://github.com/apache/kafka/pull/12175#discussion_r951133696


##########
core/src/main/scala/kafka/tools/ConsoleProducer.scala:
##########
@@ -71,7 +71,10 @@ object ConsoleProducer {
   }
 
   def getReaderProps(config: ProducerConfig): Properties = {
-    val props = new Properties
+    val props =
+      if (config.options.has(config.readerConfigOpt))
+        Utils.loadProps(config.options.valueOf(config.readerConfigOpt))
+      else new Properties

Review Comment:
   It was written the same way as in next method (https://github.com/apache/kafka/pull/12175/files#diff-3b7393aaaffd466b3bfc53c8d95109a206442160b878bbdaa0b0332257afaebaR84-R87)
   Do you want me rewrite it as well?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org