Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> block when multi-thread send msg using a single async producer on kafka 0.7.1


Copy link to this message
-
Re: block when multi-thread send msg using a single async producer on kafka 0.7.1
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
>

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB