Kafka
  1. Kafka
  2. KAFKA-400

kafka-producer-shell.sh throws exceptions trying to send data.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The producer and consumer shell are very useful for testing. The producer shell is broken and I end up doing all testing with kafka-producer-perf-test.sh which is less then idea.

      [edward@ec kafka-mirror]$ bin/kafka-producer-shell.sh --props config/consumer2.properties --topic topic_in_two
      [2012-07-11 14:27:11,926] INFO Creating sync producer for broker id = 0 at 127.0.0.2:9092 (kafka.producer.ProducerPool)
      yo
      Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to kafka.message.Message
      	at kafka.serializer.DefaultEncoder.toMessage(Encoder.scala:26)
      	at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
      	at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
      	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
      	at scala.collection.immutable.List.foreach(List.scala:45)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
      	at scala.collection.immutable.List.map(List.scala:45)
      	at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:107)
      	at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:105)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
      	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
      	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
      	at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:43)
      	at kafka.producer.ProducerPool$$anonfun$send$1.apply$mcVI$sp(ProducerPool.scala:105)
      	at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
      	at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
      	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
      	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
      	at kafka.producer.ProducerPool.send(ProducerPool.scala:100)
      	at kafka.producer.Producer.zkSend(Producer.scala:137)
      	at kafka.producer.Producer.send(Producer.scala:99)
      	at kafka.tools.ProducerShell$.main(ProducerShell.scala:65)
      	at kafka.tools.ProducerShell.main(ProducerShell.scala)
      

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Edward Capriolo
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development