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

Taught in

References

Certification courses