Oh My Algorithm
Concept Guideacks=0/1/all · Durability

Producer & acks

A producer chooses how far a message must be stored before it counts as a success. acks=0 waits for nothing and is fastest but never learns whether a broker received it; acks=1 counts the leader's write as success, so a leader failure can lose it; acks=all needs the replicas to have stored it too — the safest and the slowest.

01 Concept at a Glance

Interactive Step-by-Step
acks=0 · no confirmation
Producersends order events
send
🧾🧾🧾
Leader brokerpartition 0 · handles writes
Follower 1replica
Follower 2replica
success response (ack)

acks=0 sends the message and moves straight on. It never waits for a response.

Logic Node1 / 4
acks=1 · leader only
Producersends order events
send
🧾🧾🧾
Leader brokerpartition 0 · handles writes
Follower 1replica
Follower 2replica
success response (ack)

acks=1 waits for the leader broker to confirm that it wrote the message to its own log.

Logic Node1 / 5
acks=all · replicas too
Producersends order events
send
🧾🧾🧾
Leader brokerpartition 0 · handles writes
Follower 1replica
Follower 2replica
success response (ack)

acks=all counts a write as successful only once the caught-up replicas (the ISR) have stored it too.

Logic Node1 / 5

02 Understand It Simply

For Everyone
🔑Analogy

Like posting a letter. Drop it in the box and walk away (acks=0), take a receipt (acks=1), or wait for confirmation that it arrived (acks=all). More certainty, more waiting.

💡In Plain Words

acks decides when a write is answered as successful.

0 waits for no response at all, so a dropped connection goes unnoticed.

1 confirms only the leader broker's write, so if the leader dies before the followers replicate, that message is gone.

all responds only once the ISR — the caught-up replicas — have stored it, so it survives losing a broker.

Pick based on whether the data can afford to disappear.

📍Where It's Used
  • Separating settings for lossy data (logs
  • metrics) from critical data (payments)
  • and tuning the throughput/latency/durability trade-off

03 Frequently Asked Questions

FAQ
What is Producer & acks?+

A producer chooses how far a message must be stored before it counts as a success. acks=0 waits for nothing and is fastest but never learns whether a broker received it; acks=1 counts the leader's write as success, so a leader failure can lose it; acks=all needs the replicas to have stored it too — the safest and the slowest.

Where is Producer & acks used?+

Separating settings for lossy data (logs, metrics) from critical data (payments), and tuning the throughput/latency/durability trade-off.

What's a simple analogy for Producer & acks?+

Like posting a letter. Drop it in the box and walk away (acks=0), take a receipt (acks=1), or wait for confirmation that it arrived (acks=all). More certainty, more waiting.

Guide Progress0%