You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2014/10/24 02:07:03 UTC

git commit: kafka-1711; WARN Property topic is not valid when running console producer; patched by Joe Crobak; reviewed by Jun Rao

Repository: kafka
Updated Branches:
  refs/heads/trunk b77099626 -> e402c7be7


kafka-1711; WARN Property topic is not valid when running console producer; patched by Joe Crobak; reviewed by Jun Rao


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e402c7be
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e402c7be
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e402c7be

Branch: refs/heads/trunk
Commit: e402c7be723e5f189a8f2b4f91a28f3b26ea9112
Parents: b770996
Author: Joe Crobak <jo...@gmail.com>
Authored: Thu Oct 23 17:06:49 2014 -0700
Committer: Jun Rao <ju...@gmail.com>
Committed: Thu Oct 23 17:06:49 2014 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/ConsoleProducer.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e402c7be/core/src/main/scala/kafka/tools/ConsoleProducer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/ConsoleProducer.scala b/core/src/main/scala/kafka/tools/ConsoleProducer.scala
index 397d80d..1061cc7 100644
--- a/core/src/main/scala/kafka/tools/ConsoleProducer.scala
+++ b/core/src/main/scala/kafka/tools/ConsoleProducer.scala
@@ -35,9 +35,11 @@ object ConsoleProducer {
     val config = new ProducerConfig(args)
     val reader = Class.forName(config.readerClass).newInstance().asInstanceOf[MessageReader]
     val props = new Properties
-    props.put("topic", config.topic)
     props.putAll(config.cmdLineProps)
-    reader.init(System.in, props)
+    
+    val readerProps = new Properties(props)
+    readerProps.put("topic", config.topic)
+    reader.init(System.in, readerProps)
 
     try {
         val producer =