Re: Re: when will the messsages be sent to broker

2017-03-01 Thread Yuanjia
Hi Matthias, I check my testing procedure again and again. I find a problem in that. I start a producer in debug mode and the breakpoint is suspended to all thread. It maybe block producing thread. After change to suspend to the main thread, the message is sent out immediately. Thanks.

Re: when will the messsages be sent to broker

2017-03-01 Thread Matthias J. Sax
That's weird. If batch.size=0 and linger.ms=0 records should get send out immediately. buffer.memory is an upper bound for the overall memory. If you write to multiple partitions, there will be a buffer for each partitions and buffer.memory is shared over all buffers. Furthermore, if you exceed

Re: Re: when will the messsages be sent to broker

2017-03-01 Thread Yuanjia
Hi, Records are not sent out immediately, even if configing batch.size=0 and linger.ms=0, They are buffered in the memory(buffer.memory). I don't want to do sync writes by future.get, which performance is not good. Have any configure can increase sending frequency? config buffer.memory=0?

Re: when will the messsages be sent to broker

2017-03-01 Thread Matthias J. Sax
There is also linger.ms parameter that is an upper bound how long a (not yet filled) buffer is hold before sending it even if it's not full. Furthermore, you can do sync writes and block until producer received all acks. But it might have a performance penalty.

Re: when will the messsages be sent to broker

2017-03-01 Thread Kaufman Ng
By default producer batches records (into a buffer) until batch.size is reached, then records will be sent out. Try lowering batch.size in your producer config. You might want to look at the producer javadoc here:

when will the messsages be sent to broker

2017-03-01 Thread Yuanjia
Hi all, When will the messsages be sent in kafka0.10.0?If I use KafkaProducer.send to send one message, the messsages isn't sent immediately except invoke flush or close. Thanks. Yuanjia Li