kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <matth...@confluent.io>
Subject Re: when will the messsages be sent to broker
Date Wed, 01 Mar 2017 17:42:47 GMT
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.

http://docs.confluent.io/current/clients/producer.html#synchronous-writes



-Matthias

On 3/1/17 6:55 AM, Kaufman Ng wrote:
> 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:
> http://kafka.apache.org/0102/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html
> 
> On Wed, Mar 1, 2017 at 3:14 AM, Yuanjia <yuanjia8947@163.com> wrote:
> 
>> 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
>>
> 
> 
> 


Mime
View raw message