sijie commented on a change in pull request #5788: [pulsar-java-client] 
Decouple partition switch frequency with maxPublishDelay in producer 
configuration
URL: https://github.com/apache/pulsar/pull/5788#discussion_r353510004
 
 

 ##########
 File path: 
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ProducerBuilder.java
 ##########
 @@ -349,6 +349,20 @@
      */
     ProducerBuilder<T> batchingMaxPublishDelay(long batchDelay, TimeUnit 
timeUnit);
 
+    /**
+     * Set the partition switch frequency while batching of messages is 
enabled and
+     * using round-robin routing mode for non-keyed message <i>default: 10</i>.
+     *
+     * The time period of partition switch is frequency * 
batchingMaxPublishDelay. During this period,
+     * all messages arrives will be route to the same partition.
+     *
+     * @param frequency the frequency of partition switch
+     * @return the producer builder instance
+     * @see #messageRoutingMode(MessageRoutingMode)
+     * @see #batchingMaxPublishDelay(long, TimeUnit)
+     */
+    ProducerBuilder<T> batchingPartitionSwitchFrequency(int frequency);
 
 Review comment:
   Oh I misread the code. I see it now.  Then that's fine to me.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to