beginnerProducer & Consumer Internals

What does a Kafka producer's `acks` setting control, and what's the trade-off between `acks=1` and `acks=all`?

`acks` controls how many broker replicas must confirm they've written a message before the producer considers it 'sent successfully.' `acks=1` only waits for the partition leader (faster, but a message can be lost if the leader crashes before replicating), while `acks=all` waits for all in-sync replicas (slower, but the message survives a leader failure) — a classic throughput-vs-durability trade-off.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why does a Kafka consumer track its own 'offset' instead of the broker tracking what each consumer has read?← Back to all Kafka & Microservices questions