showuon commented on a change in pull request #10987:
URL: https://github.com/apache/kafka/pull/10987#discussion_r671770692



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java
##########
@@ -234,7 +234,24 @@
 
     /** <code>partitioner.class</code> */
     public static final String PARTITIONER_CLASS_CONFIG = "partitioner.class";
-    private static final String PARTITIONER_CLASS_DOC = "Partitioner class 
that implements the <code>org.apache.kafka.clients.producer.Partitioner</code> 
interface.";
+    private static final String PARTITIONER_CLASS_DOC = "A class to use to 
determine which partition to be send to when produce the records. Available 
options are:" +
+        "<ul>" +
+            
"<li><code>org.apache.kafka.clients.producer.internals.DefaultPartitioner</code>:
 The default partitioner. " +
+        "This strategy will try sticking to a partition until the batch is 
full, or <code>linger.ms</code> is up. It works with the strategy:" +
+                "<ul>" +
+                    "<li>If no partition is specified but a key is present, 
choose a partition based on a hash of the key</li>" +
+                    "<li>If no partition or key is present, choose the sticky 
partition that changes when the batch is full, or <code>linger.ms</code> is 
up.</li>" +
+                "</ul>" +
+            "</li>" +
+            
"<li><code>org.apache.kafka.clients.producer.RoundRobinPartitioner</code>: This 
partitioning strategy is that " +

Review comment:
       @chia7712 , thanks for reminding. I didn't know this issue. I added a 
note in RoundRobinPartitioner description. Thanks.
   `This partitioning strategy is that each record in a series of consecutive 
records will be sent to a different partition(no matter if the 'key' is 
provided or not), until we run out of partitions and start over again. Note: 
There's a known issue that will cause uneven distribution when new batch is 
created. Please check KAFKA-9965 for more detail.`




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