Why this matters
- VaultCommerce production uses
acks=allwithmin.insync.replicas=2— no silent loss on single broker failure. acks=1saved 2ms but lost orders during a follower lag incident — never again on financial topics.- Retries without idempotence create duplicates — pair retries with
enable.idempotence=true. - Most common producer tuning question in senior interviews.
acks=0
No wait
May loseFire and forget
acks=1
Leader ack
Leader crash risk
acks=all
ISR ack
DurableProduction
acks levels
acks=0: fire-and-forget, no broker ack. acks=1: leader wrote to local log. acks=all: all ISR replicas acked. VaultCommerce uses all for order and payment topics; 1 only for debug telemetry.
Key points
- acks=all — wait for ISR replication before success
- min.insync.replicas — broker-side gate; writes fail if ISR too small
- retries — producer resends on retriable exceptions
- delivery.timeout.ms — upper bound for total send attempt duration
- NotLeaderOrFollowerException — transient; retries after metadata refresh
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 2 sections
- Retry and delivery timeout
- VaultCommerce rollout checklist
Test yourself
Answer these before moving on — recall is what makes it stick.