Repository: kafka Updated Branches: refs/heads/trunk 2586226a9 -> 85c441023
KAFKA-3129; Console producer issue when request-required-acks=0 change console producer default acks to 1, update acks docs. Also added the -1 config to the acks docs since that question comes up often. ijuma and vahidhashemian, does this look reasonable to you? Author: Dustin Cote <[email protected]> Reviewers: Vahid Hashemian <[email protected]>, Ismael Juma <[email protected]> Closes #1795 from cotedm/KAFKA-3129 Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/85c44102 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/85c44102 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/85c44102 Branch: refs/heads/trunk Commit: 85c441023b2cfb0860115a52ad36075a618b0fc1 Parents: 2586226 Author: Dustin Cote <[email protected]> Authored: Wed Sep 7 16:07:52 2016 +0100 Committer: Ismael Juma <[email protected]> Committed: Wed Sep 7 16:07:52 2016 +0100 ---------------------------------------------------------------------- .../java/org/apache/kafka/clients/producer/ProducerConfig.java | 2 +- core/src/main/scala/kafka/tools/ConsoleProducer.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/85c44102/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java ---------------------------------------------------------------------- diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java b/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java index 2ca2183..927229d 100644 --- a/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java +++ b/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java @@ -88,7 +88,7 @@ public class ProducerConfig extends AbstractConfig { + " acknowledging the record but before the followers have replicated it then the record will be lost." + " <li><code>acks=all</code> 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."; + + " remains alive. This is the strongest available guarantee. This is equivalent to the acks=-1 setting."; /** <code>timeout.ms</code> */ http://git-wip-us.apache.org/repos/asf/kafka/blob/85c44102/core/src/main/scala/kafka/tools/ConsoleProducer.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/kafka/tools/ConsoleProducer.scala b/core/src/main/scala/kafka/tools/ConsoleProducer.scala index a4cc3f1..c536359 100644 --- a/core/src/main/scala/kafka/tools/ConsoleProducer.scala +++ b/core/src/main/scala/kafka/tools/ConsoleProducer.scala @@ -179,7 +179,7 @@ object ConsoleProducer { .withRequiredArg .describedAs("request required acks") .ofType(classOf[java.lang.String]) - .defaultsTo("0") + .defaultsTo("1") val requestTimeoutMsOpt = parser.accepts("request-timeout-ms", "The ack timeout of the producer requests. Value must be non-negative and non-zero") .withRequiredArg .describedAs("request timeout ms")
