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 <yuanjia8...@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 >> > > >
signature.asc
Description: OpenPGP digital signature