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
- record batch — A group of records sent to the broker together in one request, instead of one request per record.
- batch.size — The producer setting for the maximum number of bytes collected into one partition's batch before it is sent.
- latency — The time between asking for something and getting the answer back.
- throughput — How much work a system completes per unit of time, such as requests per second.
Taught in
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Retry That Overtook — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Brokers Down — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Data Centre That Went Dark — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Seventy One Percent — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Batching, Linger And Throughput — Apache Kafka & Event Streaming