ijuma commented on code in PR #18080:
URL: https://github.com/apache/kafka/pull/18080#discussion_r1894810882


##########
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java:
##########
@@ -93,8 +93,9 @@ public class ProducerConfig extends AbstractConfig {
                                                  + "<p>"
                                                  + "Note: This setting gives 
the upper bound of the batch size to be sent. If we have fewer than this many 
bytes accumulated "
                                                  + "for this partition, we 
will 'linger' for the <code>linger.ms</code> time waiting for more records to 
show up. "
-                                                 + "This 
<code>linger.ms</code> setting defaults to 0, which means we'll immediately 
send out a record even the accumulated "
-                                                 + "batch size is under this 
<code>batch.size</code> setting.";
+                                                 + "This 
<code>linger.ms</code> setting defaults to 5, which means we'll wait 5ms for 
the accumulated "
+                                                 + "<code>batch.size</code> to 
fill as much as it can in this timeframe. This value previously defaulted"
+                                                 + "to 0, but over time we 
have observed that the IO overhead caused by smaller batches negates any 
latency gains.";

Review Comment:
   The wording here is a little odd. I would write something like:
   
   "This defaults to 5, which means the producer will wait for 5ms or until the 
record batch is of <code>batch.size</code> (whichever happens first) before 
sending the record batch. Note that broker backpressure can result in a higher 
effective linger time than this setting.
   
   The default changed from <code>0</code> to <code>5</code> in Apache Kafka 
4.0 as the efficiency gains from larger batches typically result in similar or 
lower producer latency despite the increased linger."



-- 
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