acks
The producer setting that decides how many brokers must confirm a record before the send counts as successful: 0, 1 or all.
acks=0 or acks=1 can lose records that the producer believes were sent if a broker fails.
In more detail
With 0 the producer does not wait at all, with 1 only the partition leader must write it, and with all every in-sync replica must have it. Higher settings add latency but protect against losing records when a broker fails. The Java client defaults to all since Kafka 3.0.
Example
KafkaProducer(bootstrap_servers=b, acks='all')Related terms
- acknowledgement — A reply that confirms a message or delivery was received and safely recorded, so the sender can stop retrying it.
- min.insync.replicas — The topic or broker setting for the smallest number of in-sync replicas that must confirm an acks=all write for it to succeed.
- in-sync replica set — The replicas of a partition that are currently caught up with the leader, abbreviated ISR.
- ACID — The four guarantees of a database transaction: atomicity, consistency, isolation and durability.
Taught in
- The Payment That Was Charged Twice — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Ninety Minutes, No Question Count — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Acknowledged Is Not Always Safe — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Error Storm That Fixes Itself — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Retry That Overtook — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Brokers Down — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Forty One Under-Replicated Partitions — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Data Centre That Went Dark — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Controllers At Once — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Seventy One Percent — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Night Before The Administrator Exam — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Acknowledgements: What Acks Means For Durability — Apache Kafka & Event Streaming
- In-Sync Replicas And Minimum ISR — Apache Kafka & Event Streaming
- Losing A Broker — Apache Kafka & Event Streaming