The acks config controls the durability of sent records: acks=0 means the producer does not wait for any acknowledgment, the record is immediately added to the socket buffer and considered sent, no guarantee can be made that the server received it, and retries do not take effect; acks=1 means the leader writes the record to its local log but responds without awaiting full follower acknowledgement, so the record is lost if the leader fails before followers replicate it; acks=all — equivalent to acks=-1 and the default — means the leader waits for the full set of in-sync replicas, the strongest available guarantee. Idempotence (enable.idempotence, default true) ensures exactly one copy of each message is written, and requires acks=all, retries greater than 0, and max.in.flight.requests.per.connection at most 5; explicitly enabling it with conflicting settings throws a ConfigException. With idempotence off and more than one in-flight request, retries can reorder messages within a partition. For throughput, batch.size sets the upper bound in bytes of a per-partition batch (zero disables batching), and linger.ms, which defaults to 5 since Kafka 4.0, waits for more records before sending. Scope: Apache Kafka. Reviewed October 4, 2026.
Producer configuration for durability and throughput
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- kafka.apache.org
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.