|
|
-
Re: block when multi-thread send msg using a single async producer on kafka 0.7.1Neha Narkhede 2013-03-05, 16:48
That is because the zookeeper read is the slowest thing happening on the
producer. I think creating a new producer per thread is a better model. Thanks, Neha On Tue, Mar 5, 2013 at 1:51 AM, mmLiu <[EMAIL PROTECTED]> wrote: > I notice that if we call *send* method of an async producer in multi-thread > environment, many of these threads will block at > kafka.producer.ZKBrokerPartitionInfo.getBrokerInfo(ZKBrokerPartitionInfo< > https://github.com/apache/kafka/blob/0.7.1/core/src/main/scala/kafka/producer/Producer.scala#L121 > > > .scala:119) > > should I create a new Producer for each msg(or each thread) I send? > > -- > Best Regards > > ---------------------- > 刘明敏 | mmLiu > |