I've got the problem with producing messages to Kafka topic.
When producing a few messages to Kafka topic, intermittently it fails with an exception:
org.apache.kafka.common.errors.TimeoutException: Expiring 6 record(s) for some-topic-1: 30056 ms has passed since batch creation plus linger time
The problem seems to be different than others I already found here. It happens with really low load. I'm pretty sure that I not exceed buffer size (default value). linger.ms
setting is set to 0 (default). request.timeout.ms
is also set to default which is 30000.
Actually my question is: is there anything that could hold sending kafka message process for 30 seconds between calling send()
method and actually sending it? I'm looking for anything that could make ProducerBatch
living time longer than 30 seconds in very low load (or without any load).
I use Kafka managed service from external provider so I asked him about broker status and he said everything is ok. Btw, it happens on three different Kafka instances. Kafka Client version doesn't matter too - it's happening for both 0.11.0.0 and 2.0.1.