linger.ms

The producer setting for how many milliseconds to wait for more records before sending a batch that is not yet full.

In more detail

A small linger such as 5 to 50 milliseconds lets more records share a batch, raising throughput at the cost of a little latency per record. kafka-python defaults to 0, and the Java client defaults to 5 since Kafka 4.0.

Example

KafkaProducer(linger_ms=50)

Related terms

Taught in

References

Certification courses