Kafka acknowledgment (acks) vs offset commit: what's the difference?
Codemia Knowledge Hub ·
Acknowledgment and commit sit on opposite sides of Kafka. Acknowledgment (acks) is a producer setting that controls how many brokers must confirm a write before the send counts as successful, trading latency for durability. A commit is a consumer action that records the offset it has processed up to, so a replacement consumer knows where to resume after a failure.
Producer acknowledgments: acks=0, 1 and all
When a producer sends a message, it chooses how much acknowledgment it needs from the brokers:
acks=0: the producer does not wait for any acknowledgment. Lowest latency, highest risk of data loss.acks=1(the "leader ack"): the producer is acknowledged as soon as the leader replica has the message. A balance between latency and reliability.acks=all(oracks=-1): every in-sync replica must acknowledge. Higher durability at the cost of higher latency.
A producer configuration using acks=all:
The producer waits for all in-sync replicas, increasing reliability at some cost to performance.
Consumer offset commits: automatic or manual
A consumer tracks which messages it has processed by committing offsets. The committed offset tells Kafka how far the group has consumed, so after a consumer failure the new instance starts from there.
- Automatic commit: set
enable.auto.committotrueand Kafka commits offsets everyauto.commit.interval.ms. - Manual commit: gives you control over when a message counts as processed.
commitSync()commits the latest offset returned bypoll()and blocks until the commit completes.commitAsync()commits asynchronously without waiting for the broker's response.
A consumer set up for manual commits:
Acknowledgment vs commit side by side
| Feature | Acknowledgment | Commit |
| Relevant to | Producers | Consumers |
| Purpose | Ensures message delivery reliability | Manages message consumption state |
| Settings | acks=0, acks=1, acks=all | Automatic (enable.auto.commit=true), Manual (commitSync(), commitAsync()) |
| Impact | Affects data reliability and latency | Ensures messages are not reprocessed |
| Configuration | Producer settings | Consumer settings |
Whether you prioritize speed, durability or a balance of both decides how you configure each side.
Related reading
- Kafka ACL issue using Java code
- kafka AdminClient API Timed out waiting for node assignment
- Kafka and Akka Cluster
- Kafka and firewall rules
- Kafka and hotspots in a partition
- Kafka AND REST for communication between microservices?
- Kafka async Commit Offset Replication
- kafka Commit offsets failed with retriable exception. You should retry committing offsets
Course lessons on this
System design interview problems on this topic
- Design a Distributed Messaging System: solution and walkthrough
- Design a Log Collection and Analysis System: solution and walkthrough
- Design an Ad Click Aggregation System: solution and walkthrough
- Design a Webhook Notification Service: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.