当我在我的 Kafka 生产者中将 acks 设置为 all 时得到 acks = -1
Getting acks = -1 when I set acks to all in my Kafka producer
我在我的 Kafka 生产者上设置了以下 属性:
properties.setProperty(ProducerConfig.ACKS_CONFIG, "all");
当我启动我的应用程序时,我在 ProducerConfig values
中看到 acks = -1
。这是为什么?
对于生产者配置,-1
的 acks
属性 等于 all
。
Producer config 来自 Kafka 文档:
acks=all This means the leader will wait for the full set of in-sync
replicas to acknowledge the record. This guarantees that the record
will not be lost as long as at least one in-sync replica remains
alive. This is the strongest available guarantee. This is equivalent
to the acks=-1 setting.
我在我的 Kafka 生产者上设置了以下 属性:
properties.setProperty(ProducerConfig.ACKS_CONFIG, "all");
当我启动我的应用程序时,我在 ProducerConfig values
中看到 acks = -1
。这是为什么?
对于生产者配置,-1
的 acks
属性 等于 all
。
Producer config 来自 Kafka 文档:
acks=all This means the leader will wait for the full set of in-sync replicas to acknowledge the record. This guarantees that the record will not be lost as long as at least one in-sync replica remains alive. This is the strongest available guarantee. This is equivalent to the acks=-1 setting.