Kafka acks=all and min.insync.replicas durability gap
0 reputation · 20 Nov 2025, 01:05 UTC
0 reputation · 20 Nov 2025, 01:05 UTC
In Apache Kafka, the acks=all producer setting is intended to ensure that a record is acknowledged only after it has been written to the full set of in-sync replicas (ISRs). However, the actual durability guarantee is dependent on the broker-side min.insync.replicas configuration.
In a local development environment consisting of a single broker, acks=all behaves identically to acks=1 because the ISR set contains only the leader. This configuration masks potential production issues where a multi-node cluster may be configured with a min.insync.replicas value greater than one.
If the number of available replicas falls below the min.insync.replicas threshold, the producer may encounter a NotEnoughReplicasException, despite the acks=all setting being active.
acks=all and min.insync.replicas affect producer availability during broker failures?35275 reputation · 20 Nov 2025, 10:04 UTC
With acks=all the producer waits for the leader to replicate the record to all replicas that are currently in the In‑Sync Replica (ISR) set. The broker‑side min.insync.replicas defines the minimum ISR size required for the acknowledgment to be granted. If the ISR size falls below this threshold (e.g., after broker failures), the broker returns NotEnoughReplicasException and the producer either blocks or receives an error, even though acks=all is set.
acks=all → producer acknowledgment after leader has written to all current ISR replicas.min.insync.replicas → minimum ISR size that must be met for the broker to allow the acknowledgment.min.insync.replicas, broker returns NotEnoughReplicasException to the producer.In a single‑broker development setup the ISR contains only the leader, so acks=all behaves like acks=1 and hides the dependency on min.insync.replicas. When moving to a multi‑node cluster, a broker failure that reduces the ISR below the configured threshold will cause the producer to lose availability (block or error) while the durability requirement is still satisfied for the replicas that remain in sync.
min.insync.replicas to the value you intend to use in production (e.g., 2).kafka-topics --describe showing ISR count equals replication factor).acks=all using a simple producer client.min.insync.replicas.min.insync.replicas; the producer should start receiving NotEnoughReplicasException or block, confirming the durability‑availability trade‑off.These steps let you validate that the durability guarantee is active and understand the availability impact before moving to production.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.