I have been setted on a single node in Kafka and started zoo operators as well as for the Kafka server. It is tested and consumed on the console and this is.But works when I am running an internal kafka consumer on the console and my custom creator does not work it. Below is my Creator category Control producer.send (), this following exception stops after Kafka
Properties Property = New Property (); Props.put ("metadata.broker.list", "xx.xx.xx.xx: 9092"); Propsput ("serializer .class", "kaphka.crylizer.string encoder"); Props.put ("partitioner.class", "com.example.producer.SimplePartitioner"); Propsput ("request.required.acks", "1"); Manufacturer Config Config = New Creator Conf. (Prop); Manufacturer & lt; String, string & gt; Manufacturer = new creator & lt; String, string & gt; (Config); KeyedMessage & lt; String, string & gt; Data = new key message & lt; String, string & gt; ("Mail", "xxxx"); Producer.send (data);
with java.nio.channels.ClosedChannelException after 3 attempts access is kafka.producer.SyncProducer.kafka $ manufacturer $ SyncProducer .network.BlockingChannel.send (BlockingChannel.scala to $$ doSend (SyncProducer.scala :: 100) kafka.producer.SyncProducer.liftedTree1 $ 1 (73 SyncProducer.scala ): 72) kafka.producer.SyncProducer.send (on SyncProducerkscala on Kafka 82) on kafka.producer.BrokerPartitionInfo.updateInfo 58) (BrokerPartitionInfo.scala: kafka.client.ClientUtils in $ .fetchTopicMetadata (ClientUtils.scala 113). producer.async.DefaultEventHandler $$ anonfun $ handle $ 2.Apply $ MCV $ SP (DefaultEventHandler.scala: 78) kafka.utils.Utils $ .swallow (Utils.scala: 17 2) in kafka.utils.Logging $ class.swallowError (Logging.scala: 106) kafka.producer.async.DefaultEventHandler.handle on kafka.utils.Utils $ .swallowError (Utils.scala: 45) (DefaultEventHandler.scala: 78) on kafka.producer.Producer.send (manufacturer .scala: 77) kafka.javaapi.producer.Producer.send (Producer.scala: 33)
Sunday, 15 September 2013
java - Unable to communicate with kafka server using kafka Producer API -
I was trying to connect to the Kaffka server from a manufacturer class in Eclipse from external VM. I had to change the local host with Kafka's IP / IP address in producer.properties.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment