batch.size
The producer setting for the maximum number of bytes collected into one partition's batch before it is sent.
In more detail
The default is 16384 bytes. A batch is sent as soon as it is full, even if linger.ms has not expired. Setting it very small, as the course does with 1, effectively turns batching off.
Example
KafkaProducer(batch_size=16384, 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.
- linger.ms — The producer setting for how many milliseconds to wait for more records before sending a batch that is not yet full.
- 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
- Batching, Linger And Throughput — Apache Kafka & Event Streaming