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_r353333567
 
 

 ##########
 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:
   It is better to add both time interval and time unit in the method, by 
following the convention of other time related settings.

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