What Is Acknowledgments (acks) in Kafka?

What Is Acknowledgments (acks) in Kafka?

One small setting that decides how sure Kafka must be before it tells you a message was safely written, and how much speed you are willing to trade for that certainty.

Imagine dropping off an important legal document at a courier office. You could hand it over and simply walk away, trusting it will arrive. You could wait until the local branch confirms it has physically received the envelope. Or you could wait until the courier confirms the document has reached every one of its backup storage locations across the city, so that even a fire at one branch could not destroy it. Each choice takes a different amount of time, and each gives you a different level of certainty. Kafka’s acks setting is exactly this choice, applied to every single message a producer sends.

1The Big Picture: What Does Acks Mean?

Acks, short for acknowledgements, is a setting that tells a Kafka producer how much confirmation to wait for before considering a message successfully sent.

When a producer sends a message to Kafka, that message does not simply vanish into the void, hopefully arriving somewhere useful. Kafka can send a confirmation back, an acknowledgement, once the message has actually been written. The acks setting controls exactly how much proof the producer demands before it treats that confirmation as good enough to move on.

This single setting has an outsized effect on a system’s behavior. Set it one way, and messages fly out with almost no delay, but some could silently vanish if something goes wrong at the wrong moment. Set it another way, and every message is confirmed as safely and thoroughly stored across multiple servers, at the cost of a little extra waiting time on every send.

Simple Analogy

Think of handing a friend cash to deposit at the bank for you. You could simply hand it over and walk away, trusting them completely. You could wait until they text you a photo of the deposit receipt. Or you could wait until you see the updated balance reflected in your own account online. Each level of waiting gives you a different amount of real certainty.

2Why This Setting Exists at All

Every messaging system faces the same unavoidable tension: confirming something took longer, but confirming nothing is dangerous.

If Kafka always waited for the strongest possible confirmation on every single message, every send would be slower than it needs to be, even for data where a rare, tiny bit of loss would barely matter, such as a mobile app logging which button a user tapped. On the other hand, if Kafka never waited for any confirmation at all, even critical data, such as a bank transaction, could occasionally vanish without a trace, with no way for anyone to even notice.

Rather than forcing one single answer on every use case, Kafka hands this decision to the people building the system. The acks setting lets a payment service demand the strongest possible guarantee, while a casual analytics pipeline, sending millions of low-stakes events, can happily trade a little certainty for a lot more speed.

Reason 1

Different Data, Different Stakes

A lost click event and a lost payment are simply not equally serious, so they should not require equally strict guarantees.

Reason 2

Speed vs Certainty

Waiting for more confirmation always takes a little longer; acks lets teams choose exactly how much time that certainty is worth.

Reason 3

One Cluster, Many Needs

The same Kafka cluster can serve very different topics, each configured with the acks level that actually fits its own data.

3Core Vocabulary Around Acks

A handful of closely related terms come up whenever acks is discussed. Understanding them together makes the whole picture click into place.

Term 1

Producer

The program sending a message, and the party that ultimately decides which acks setting to use.

Term 2

Leader Replica

The one copy of a partition responsible for handling every write, the very first place a message lands.

Term 3

Follower Replica

A backup copy of a partition that continuously copies data from the leader, ready to take over if needed.

Term 4

In-Sync Replica (ISR)

A follower that has genuinely caught up with the leader’s latest data, making it trustworthy for confirmation purposes.

Term 5

Acknowledgement

The signal Kafka sends back to a producer confirming a message has been written, exactly as strictly or loosely defined by the acks setting.

Term 6

Durability

How confident the system can be that a written message will actually survive a failure, directly shaped by the acks setting chosen.

Simple Analogy

Picture a school assignment submitted to a main office, which is then supposed to be copied and filed at two backup archive rooms. The main office is the leader; the two archive rooms are followers; an archive room that already has today’s copy on file is in sync.

4The Three Levels of Acks

Kafka offers three distinct settings, each representing a different point along the speed-versus-safety spectrum.

acks = 0 — Fire and Forget

The producer sends the message and does not wait for any confirmation whatsoever. It simply assumes success and moves on immediately. This is the fastest possible option, but it offers essentially no protection: if the message never actually reaches the broker, the producer has no way of knowing.

acks = 1 — Leader Confirmation

The producer waits until the leader replica confirms it has written the message to its own log. This is a reasonable middle ground: fast, and fairly safe under normal conditions, but if the leader fails immediately after confirming, before followers have had a chance to copy the data, that message could still be lost.

acks = all (or acks = -1) — Full Replica Confirmation

The producer waits until every currently in-sync replica has confirmed it has the message, not just the leader. This is the strongest guarantee Kafka offers: as long as at least one in-sync replica survives any failure, the message is safe. It is also the slowest of the three options, since it waits for the most confirmations.

flowchart LR
    A["acks = 0
No wait"] --> B["acks = 1
Wait for leader"] B --> C["acks = all
Wait for every in-sync replica"] A -.->|Fastest, riskiest| A C -.->|Slowest, safest| C
FIG 1 — The three acks levels arranged from fastest and riskiest to slowest and safest

5How acks = 0 Actually Behaves

This is the boldest, fastest setting, and understanding exactly what it gives up is essential before ever choosing it.

With acks = 0, the moment a producer hands a message off over the network, it considers its job done. It does not pause, does not check, and does not even find out later whether the broker ever actually received it. If the network drops the message, if the broker is briefly unreachable, or if any number of small glitches occur, the message is simply gone, with no error, no retry, and no way for anyone to realize it happened.

sequenceDiagram
    participant P as Producer
    participant B as Broker
    P->>B: Send message
    Note over P: Moves on immediately,
does not wait for a reply
FIG 2 — With acks = 0, the producer never waits to learn the outcome
!
Common Mistake

Choosing acks = 0 out of habit or for a small speed gain, without carefully asking whether the data involved could ever matter if it silently disappeared. It is best reserved for genuinely low-stakes data, where an occasional gap truly does not matter.

6How acks = 1 Actually Behaves

This is the balanced middle setting, and understanding its one specific weak spot is the key to using it wisely.

With acks = 1, the producer waits until the leader replica has written the message to its own local log, and only then does it consider the send successful. This protects against the most common kinds of problems, a dropped network packet, a brief connection hiccup, since the producer genuinely knows the leader has the data before moving on.

sequenceDiagram
    participant P as Producer
    participant L as Leader Broker
    participant F as Follower Broker
    P->>L: Send message
    L->>L: Write to local log
    L-->>P: Acknowledge
    Note over L,F: Follower may not have
copied the data yet
FIG 3 — With acks = 1, confirmation comes from the leader alone, before followers have necessarily caught up

The gap that remains is narrow but real: if the leader crashes in the brief window right after confirming, but before any follower has managed to copy that specific message, the data is lost, even though the producer was already told the send succeeded. In everyday operation this window is extremely small, but for genuinely critical data, it is a risk worth naming plainly rather than glossing over.

7How acks = all Actually Behaves

This is Kafka’s strongest promise, and it is worth seeing exactly how that extra confidence is earned.

With acks = all, the leader does not confirm the write to the producer the moment it has been written locally. Instead, it waits until every currently in-sync replica, every follower that is genuinely caught up, has also confirmed receiving the same message. Only once all of them agree does the leader finally tell the producer the send was successful.

sequenceDiagram
    participant P as Producer
    participant L as Leader Broker
    participant F1 as Follower 1
    participant F2 as Follower 2
    P->>L: Send message
    L->>L: Write to local log
    L->>F1: Replicate message
    L->>F2: Replicate message
    F1-->>L: Confirm received
    F2-->>L: Confirm received
    L-->>P: Acknowledge only after both confirm
        
FIG 4 — With acks = all, the leader waits for every in-sync follower before confirming

This means that even if the broker holding the leader replica fails the very instant after confirming, the message still exists safely on at least one other server, ready to be promoted as the new leader without any data loss. This is why acks = all is the standard choice for data where loss is simply not acceptable.

i
Good to Know

Acks = all does not mean waiting for every replica that exists, only every replica currently considered in-sync. A follower that has fallen behind is not counted, which keeps this setting from grinding to a halt over a single lagging replica.

8Comparing the Three Settings Side by Side

With each setting explained individually, seeing them laid out together makes the trade-offs much easier to weigh.

SettingWaits ForSpeedRisk of LossBest Suited For
acks = 0Nothing at allFastestHighestNon-critical, high-volume data like metrics or logs
acks = 1Leader onlyFastLow, but not zeroMost everyday application data
acks = allEvery in-sync replicaSlowestVery lowPayments, orders, anything that must never be silently lost
acks = 0
no wait, maximum speed, weakest guarantee
acks = 1
balanced default for typical application traffic
acks = all
strongest safety net for genuinely critical data

9Acks and Replication Factor: Working Together

Acks does not work alone. Its real strength depends entirely on how many replicas actually exist to confirm a write.

Acks = all is only as strong as the number of in-sync replicas available to confirm it. If a topic is configured with a replication factor of 1, meaning there is only ever one copy of the data, then acks = all behaves almost identically to acks = 1, since there is no follower to wait for in the first place. The real protection of acks = all only shows up when it is paired with a genuinely healthy replication factor, commonly 3, giving it multiple independent copies to actually confirm against.

!
Common Mistake

Setting acks = all while leaving replication factor at 1, believing this provides strong protection. Without extra replicas to wait for, this combination offers little more safety than acks = 1, while still paying the small performance cost of the stricter setting.

Simple Analogy

Demanding “confirmation from every backup archive” means very little if there is actually only one archive room in the whole building. The strength of the promise depends entirely on how many independent backups genuinely exist to confirm it.

10The Minimum In-Sync Replicas Setting

A closely related setting decides exactly how many in-sync replicas must exist before Kafka will even accept a write under acks = all.

Kafka has a companion setting, often called the minimum in-sync replicas requirement, that specifies the smallest number of replicas that must be in sync for a write using acks = all to be accepted at all. If too many followers have fallen behind or gone offline, and the number of healthy in-sync replicas drops below this minimum, Kafka will actually refuse to accept new writes for that partition, rather than silently weakening its promise.

Why Refusing Writes Is a Feature, Not a Bug

This might sound alarming at first, an outage refusing writes rather than accepting them, but it is a deliberate design choice. It ensures the strong guarantee behind acks = all is never quietly broken; instead, the system makes it clearly visible that it currently cannot offer that guarantee, giving engineers a clear, honest signal to act on.

i
Good to Know

This setting is a common companion to acks = all in serious production systems, since it turns “acks = all” from a hopeful intention into an enforced, guaranteed floor of protection.

11Real-World and Industry Examples

The choice of acks shows up as a deliberate, considered decision across nearly every serious Kafka deployment.

Banking and Payment Processing

Payment events almost universally use acks = all, paired with a healthy replication factor, since even a single silently lost transaction could mean real financial harm.

E-commerce Order Systems

Order placement events typically use acks = all or acks = 1, since losing an order silently would directly damage customer trust and revenue.

Application Metrics and Logging

High-volume, low-stakes telemetry, such as performance metrics, often uses acks = 1 or even acks = 0, since occasional gaps rarely matter and speed is prioritized.

Clickstream and User Behavior Tracking

Web analytics events frequently favor a lighter acks setting, accepting a small amount of occasional loss in exchange for handling enormous traffic volumes smoothly.

IoT Sensor Data

Many sensor readings use acks = 1, balancing reasonable safety with the sheer volume of continuous data such systems generate.

12Advantages, Disadvantages and Trade-offs

Every acks setting brings real, honest advantages, and every one of them asks something in return.

Advantages of Configurable Acks

  • Different topics can be tuned precisely to how critical their data actually is.
  • Teams get direct, explicit control over the speed-versus-safety trade-off.
  • High-volume, low-stakes data does not have to pay for guarantees it does not need.
  • Critical data can be given the strongest realistic protection Kafka offers.

Disadvantages / Trade-offs

  • Choosing the wrong setting for a topic’s actual importance is an easy mistake to make.
  • Stronger settings genuinely add latency to every single send.
  • Acks = all only helps meaningfully when paired with a healthy replication factor.
  • Understanding the subtle risk windows of each setting takes real, deliberate learning.

13Security Considerations

Acks itself is not primarily a security setting, but it interacts with security-relevant guarantees in ways worth understanding.

Consideration 1

Auditability

Weak acks settings on sensitive topics can create silent gaps in an audit trail, since lost messages leave no trace that anything was ever missing.

Consideration 2

Compliance Requirements

Some regulated industries require strong durability guarantees on certain data by law, which directly points toward stricter acks settings for those specific topics.

Consideration 3

Consistency of Records

For any system tracking who did what and when, a silently dropped event under acks = 0 can create a genuine, hard-to-detect gap in an otherwise trusted record.

!
Something to Watch

A weak acks setting on a topic that later becomes important for compliance or dispute resolution can leave gaps that are impossible to recover after the fact, since the data was simply never durably stored in the first place.

14Monitoring the Effects of Acks

The acks setting is invisible in normal operation, but its effects show up clearly in a handful of production metrics.

Metric 1

Send Latency

How long each send takes to be acknowledged, which rises predictably as acks moves from 0 toward all.

Metric 2

Failed Write Rate

How often writes are rejected, especially relevant under acks = all when minimum in-sync replica requirements are not met.

Metric 3

Under-Replicated Partitions

Directly affects how meaningful acks = all actually is at any given moment, since fewer in-sync replicas means a weaker real guarantee.

Metric 4

Producer Error Rate

Under acks = 0, this may stay artificially low even when real problems are occurring, since errors are never reported back in the first place.

i
Practical Tip

A low error rate under acks = 0 is not necessarily good news. It may simply mean the producer never had the chance to notice anything went wrong.

15Design Patterns and Anti-patterns

A few consistent habits separate teams who use acks deliberately from teams who get quietly surprised by it later.

Helpful patterns

  • Matching acks to data importance — choosing the setting deliberately based on what actual harm a lost message would cause.
  • Pairing acks = all with a healthy replication factor — so the guarantee has real backups to actually rely on.
  • Setting a minimum in-sync replicas requirement — turning acks = all into an enforced floor rather than a hopeful best effort.
  • Documenting the choice per topic — so future engineers understand exactly why a particular topic uses a particular setting.
ANTI-PATTERN-01 Avoid
Problem

Using acks = 0 for critical data such as payments or orders, purely because it was the fastest available option during early development.

Why It’s Harmful

Messages can be silently lost with no error, no retry, and no way to even know it happened, which is an unacceptable risk for data that genuinely matters.

Correct Approach

Reserve acks = 0 exclusively for data where losing an occasional message truly causes no meaningful harm.

ANTI-PATTERN-02 Avoid
Problem

Setting acks = all on a topic with a replication factor of 1, assuming this alone provides strong protection.

Why It’s Harmful

Without genuine additional replicas to confirm against, acks = all offers barely more protection than acks = 1, while still paying its performance cost.

Correct Approach

Always pair acks = all with a replication factor of at least 3 to give the setting real, meaningful backups to rely on.

16Best Practices and Common Mistakes

A short checklist for choosing and configuring acks with confidence.

Best Practices

  • Ask honestly what real-world harm losing one message would cause before choosing a setting.
  • Use acks = all for genuinely critical data, always paired with a solid replication factor.
  • Set a minimum in-sync replicas requirement for topics using acks = all.
  • Monitor latency and error rates so the true cost of each setting stays visible.
  • Revisit the choice if a topic’s importance changes over time.

Common Mistakes

  • Defaulting to the fastest setting everywhere without weighing what could actually be lost.
  • Assuming acks = all alone guarantees safety, without checking replication factor.
  • Treating acks = 0’s quiet, low error rate as a sign that everything is working fine.
  • Never revisiting the setting after a topic’s importance to the business has grown.
“Acks is not a performance knob you set once and forget. It is a promise about what you are willing to lose, made explicit in a single word.”

17Frequently Asked Questions

Q1What is the default acks setting in Kafka?

Modern Kafka producer defaults commonly use acks = all, reflecting a general industry shift toward favoring safety over raw speed unless a team deliberately chooses otherwise.

Q2Is acks = 1 good enough for most everyday applications?

For many typical use cases, yes, it offers a sensible balance. But for anything where even a rare loss would cause real harm, acks = all is the safer choice.

Q3Does a stronger acks setting guarantee a message can never be duplicated?

No, acks and duplicate prevention are separate concerns. Acks controls how confirmed a write is; preventing duplicates from retries is handled by a related feature called idempotent production.

Q4Can different topics in the same cluster use different acks settings?

Yes, acks is set by the producer for each send, so different applications or topics can easily use whatever setting fits their own data’s importance.

Q5Why would anyone ever choose acks = 0?

For extremely high-volume, low-stakes data where speed matters far more than occasional, harmless gaps, such as certain kinds of debug logging or non-critical telemetry.

Q6Does acks = all make Kafka completely unable to lose data?

It makes data loss extremely unlikely under realistic failure scenarios, as long as it is paired with a healthy replication factor, but no distributed system can offer an absolute, mathematical guarantee against every conceivable disaster.

18Summary and Key Takeaways

We started with a simple courier drop-off and ended with one of the most consequential settings in all of Kafka. Acks decides exactly how much confirmation a producer waits for before considering a message safely written, ranging from no confirmation at all, to confirmation from just the leader, to confirmation from every in-sync replica. This one choice, repeated across every topic in a system, shapes how much speed a team enjoys and how much certainty they can honestly promise their users. Choosing acks thoughtfully, and pairing it with a sensible replication factor, is one of the clearest, most direct ways to decide exactly how much a system is allowed to forget.

Key Takeaways

  • Acks controls confirmation level — it decides how much proof a producer waits for before treating a send as successful.
  • Three levels cover the spectrum — acks = 0 for speed, acks = 1 for balance, acks = all for maximum safety.
  • Each level has a real risk window — even acks = 1 has a narrow, honest gap where data could still be lost.
  • Acks = all needs real replicas — its strength depends entirely on a healthy replication factor backing it up.
  • Minimum in-sync replicas enforces the promise — turning acks = all from a hope into a guaranteed floor.
  • The right choice depends on the data — critical data deserves strong settings; low-stakes data can trade some safety for speed.
  • It’s a deliberate decision, not a default to ignore — every topic deserves its own honest answer to “what can we afford to lose?”