What are Kafka producer acknowledgements (acks)?

Answer

The acks producer configuration controls how many broker acknowledgements the producer requires before considering a write successful. acks=0: fire-and-forget. The producer sends the message without waiting for any acknowledgement. Maximum throughput, zero durability. acks=1 (default): the partition leader acknowledges after writing to its local log. If the leader fails after acknowledgement but before followers replicate, the message is lost. Balanced throughput and durability. acks=all (or -1): the leader waits until all in-sync replicas (ISR) have written the message before acknowledging. Combined with min.insync.replicas=2, this provides the strongest durability — no message loss unless a majority of replicas fail simultaneously. Use acks=all for financial, order, and critical data. Lower acks settings sacrifice durability for throughput.