ijuma commented on a change in pull request #11788:
URL: https://github.com/apache/kafka/pull/11788#discussion_r816997743



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java
##########
@@ -202,25 +208,31 @@
     /** <code>metric.reporters</code> */
     public static final String METRIC_REPORTER_CLASSES_CONFIG = 
CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG;
 
+    // max.in.flight.requests.per.connection should be less than or equal to 5 
when idempotence producer enabled to ensure message ordering
+    private static final int 
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_FOR_IDEMPOTENCE = 5;
+
     /** <code>max.in.flight.requests.per.connection</code> */
     public static final String MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION = 
"max.in.flight.requests.per.connection";
     private static final String MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_DOC = 
"The maximum number of unacknowledged requests the client will send on a single 
connection before blocking."
                                                                             + 
" Note that if this config is set to be greater than 1 and 
<code>enable.idempotence</code> is set to false, there is a risk of"
-                                                                            + 
" message re-ordering after a failed send due to retries (i.e., if retries are 
enabled).";
-    // max.in.flight.requests.per.connection should be less than or equal to 5 
when idempotence producer enabled to ensure message ordering
-    private static final int 
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_FOR_IDEMPOTENCE = 5;
+                                                                            + 
" message re-ordering after a failed send due to retries (i.e., if retries are 
enabled)."
+                                                                            + 
" Note additionally that enabling idempotence requires this config value to be 
less than or equal to " + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_FOR_IDEMPOTENCE 
+ "."

Review comment:
       Nit: remove "Note". "Additionally, enabling..." reads better.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to