Repository: kafka
Updated Branches:
  refs/heads/trunk 60c36b098 -> 561dd3864


MINOR: Update docs with regards to max.in.flight and idempotent producer

The idempotent producer doesn't change that setting any more and the
accepted range has changed.

Author: Ismael Juma <ism...@juma.me.uk>

Reviewers: Apurva Mehta <apu...@confluent.io>, Jason Gustafson 
<ja...@confluent.io>

Closes #4097 from ijuma/fix-javadoc-wrt-max-in-flight-for-idempotent


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/561dd386
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/561dd386
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/561dd386

Branch: refs/heads/trunk
Commit: 561dd3864d89db58bd3cbdd64480f12fa7249f1f
Parents: 60c36b0
Author: Ismael Juma <ism...@juma.me.uk>
Authored: Thu Oct 19 13:11:51 2017 -0700
Committer: Jason Gustafson <ja...@confluent.io>
Committed: Thu Oct 19 13:11:51 2017 -0700

----------------------------------------------------------------------
 .../org/apache/kafka/clients/producer/KafkaProducer.java  |  7 +++----
 .../org/apache/kafka/clients/producer/ProducerConfig.java | 10 +++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/561dd386/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
----------------------------------------------------------------------
diff --git 
a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java 
b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
index 60b1a9d..3185786 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
@@ -150,10 +150,9 @@ import static 
org.apache.kafka.common.serialization.ExtendedSerializer.Wrapper.e
  * </p>
  * <p>
  * To enable idempotence, the <code>enable.idempotence</code> configuration 
must be set to true. If set, the
- * <code>retries</code> config will be defaulted to 
<code>Integer.MAX_VALUE</code>, the
- * <code>max.in.flight.requests.per.connection</code> config will be defaulted 
to <code>1</code>,
- * and <code>acks</code> config will be defaulted to <code>all</code>. There 
are no API changes for the idempotent
- * producer, so existing applications will not need to be modified to take 
advantage of this feature.
+ * <code>retries</code> config will default to <code>Integer.MAX_VALUE</code> 
and the <code>acks</code> config will
+ * default to <code>all</code>. There are no API changes for the idempotent 
producer, so existing applications will
+ * not need to be modified to take advantage of this feature.
  * </p>
  * <p>
  * To take advantage of the idempotent producer, it is imperative to avoid 
application level re-sends since these cannot

http://git-wip-us.apache.org/repos/asf/kafka/blob/561dd386/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 23ef67e..228176a 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
@@ -202,11 +202,11 @@ public class ProducerConfig extends AbstractConfig {
     /** <code>enable.idempotence</code> */
     public static final String ENABLE_IDEMPOTENCE_CONFIG = 
"enable.idempotence";
     public static final String ENABLE_IDEMPOTENCE_DOC = "When set to 'true', 
the producer will ensure that exactly one copy of each message is written in 
the stream. If 'false', producer "
-                                                        + "retries due to 
broker failures, etc., may write duplicates of the retried message in the 
stream. This is set to 'false' by default. "
-                                                        + "Note that enabling 
idempotence requires <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> 
to be set to 1 and "
-                                                        + "<code>" + 
RETRIES_CONFIG + "</code> cannot be zero. Additionally " + ACKS_CONFIG + " must 
be set to 'all'. If these values "
-                                                        + "are left at their 
defaults, we will override the default to be suitable. "
-                                                        + "If the values are 
set to something incompatible with the idempotent producer, a ConfigException 
will be thrown.";
+                                                        + "retries due to 
broker failures, etc., may write duplicates of the retried message in the 
stream. "
+                                                        + "Note that enabling 
idempotence requires <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> 
to be less than or equal to 5, "
+                                                        + "<code>" + 
RETRIES_CONFIG + "</code> to be greater than 0 and " + ACKS_CONFIG + " must be 
'all'. If these values "
+                                                        + "are not explicitly 
set by the user, suitable values will be chosen. If incompatible values are 
set, "
+                                                        + "a ConfigException 
will be thrown.";
 
     /** <code> transaction.timeout.ms </code> */
     public static final String TRANSACTION_TIMEOUT_CONFIG = 
"transaction.timeout.ms";

Reply via email to