What is the most appropriate design for using kafka producer from
performance view point.I had few in my mind.
1.Since single kafka producer object have synchronization; using single
producer object from multiple thread might not be efficient.so one way
would be to use multiple kafka producer from inside same thread.
2.Have multiple thread each having it's own instance of producer.This has
thread overheads if kafka internally using the same semantics.
It would be great if someone can comment on these approaches or suggest
widely used one.
P.S. im using 0.8.0 and mostly concerned with async producer.
Thanks And Regards,
Pushkar
performance view point.I had few in my mind.
1.Since single kafka producer object have synchronization; using single
producer object from multiple thread might not be efficient.so one way
would be to use multiple kafka producer from inside same thread.
2.Have multiple thread each having it's own instance of producer.This has
thread overheads if kafka internally using the same semantics.
It would be great if someone can comment on these approaches or suggest
widely used one.
P.S. im using 0.8.0 and mostly concerned with async producer.
Thanks And Regards,
Pushkar