Skip to content
Theory · Kafka producers · lesson 7 of 8

Batching: linger.ms and batch.size

If a producer sends every record in a separate request, most of the time goes on the trip over the network rather than on the write. So a Kafka producer gathers records and sends them in batches. Two settings decide how long it waits and how much it gathers, and both the throughput and the delay of every record depend on them.

In this lesson

  • The batch
  • Two settings
  • What Kafka shows
  • Compression
  • Common mistake
  • Key points