kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patricio Echag├╝e <patric...@gmail.com>
Subject Producer thread-safety and performance
Date Wed, 04 Jan 2012 19:22:09 GMT
Hi all, I'm trying to get familiar with Kafka code base and scala. I
haven't been to answer the question myself yet.

I have a bunch of threads (managed by a Thread pool executor in Java) and
would like to know/ask recommendation as far as thread-safety goes on the
producer side.

Should I have one producer object per thread ? or one for all ?

I read in an old email that the producer has proper synchronization, but
It's not clear if it follows the concurrent approach similar to
java.concurrent package style or if it's simple java synchronization. My
goal is to not slow down the message generation.

Thanks in advance.
Patricio

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message