jayteej commented on code in PR #18080: URL: https://github.com/apache/kafka/pull/18080#discussion_r1895864442
########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -147,8 +148,9 @@ public class ProducerConfig extends AbstractConfig { + "of as analogous to Nagle's algorithm in TCP. This setting gives the upper bound on the delay for batching: once " + "we get <code>" + BATCH_SIZE_CONFIG + "</code> worth of records for a partition it will be sent immediately regardless of this " + "setting, however if we have fewer than this many bytes accumulated for this partition we will 'linger' for the " - + "specified time waiting for more records to show up. This setting defaults to 0 (i.e. no delay). Setting <code>" + LINGER_MS_CONFIG + "=5</code>, " - + "for example, would have the effect of reducing the number of requests sent but would add up to 5ms of latency to records sent in the absence of load."; + + "specified time waiting for more records to show up. This setting defaults to 5 (i.e. 5ms delay). Increasing <code>" + LINGER_MS_CONFIG + "=50</code>, " + + "for example, would have the effect of reducing the number of requests sent but would add up to 50ms of latency to records sent in the absence of load." Review Comment: I have not changed the wording here. This is the same example with different values. I can change the wording also if you think it helps or isn't grokable? ########## 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: Will update -- 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