Sobes.tech
Middle

What is the purpose of the acks parameter in Kafka settings?

sobes.tech AI

Answer from AI

The acks parameter in Kafka settings determines how many acknowledgments from brokers are required for a successful message write. It affects the producer's reliability and performance:

  • acks=0: the producer does not wait for acknowledgment from the broker, maximum speed, but data loss is possible.
  • acks=1: the producer waits for acknowledgment from the partition leader, a balance between reliability and performance.
  • acks=all (or acks=-1): the producer waits for acknowledgment from all replicas, maximum reliability, but higher latency.

The choice of value depends on the requirements for message reliability and processing speed.