Re: Simple KafkaProducer to handle multiple requests or not

2017-03-14 Thread Amit K
Thanks Robert Quinlivan, Got this one clear. Have been going through additional docs, they seems to point to this though bit subtly. Thanks again for your help! On Mon, Mar 13, 2017 at 10:20 PM, Robert Quinlivan wrote: > There is no need to create a new producer instance for each write request

Re: Simple KafkaProducer to handle multiple requests or not

2017-03-13 Thread Robert Quinlivan
There is no need to create a new producer instance for each write request. In doing so you lose the advantages of the buffering and batching that the producer offers. In your use case I would recommend having a single running producer and tuning the batch size and linger.ms settings if you find tha

Simple KafkaProducer to handle multiple requests or not

2017-03-13 Thread Amit K
Hi, I am using simple kafka producer (java based, version 0.9.0.0) in an application where I receive lot of hits (about 50 per seconds, in much like servlet way) on application that has kafka producer. Per request comes different set of records. I am using only one instance of kafka producer to p