You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/14 05:35:27 UTC

[GitHub] merlimat commented on a change in pull request #3118: UnAcked message tracker based on TimePartition

merlimat commented on a change in pull request #3118: UnAcked message tracker based on TimePartition
URL: https://github.com/apache/pulsar/pull/3118#discussion_r241648218
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/api/ConsumerBuilder.java
 ##########
 @@ -154,6 +154,20 @@
      */
     ConsumerBuilder<T> ackTimeout(long ackTimeout, TimeUnit timeUnit);
 
+    /**
+     * Set the timeout for unacked messages, truncated to the nearest millisecond. The timeout needs to be greater than
+     * 10 seconds.
+     *
+     * @param ackTimeout
+     *            for unacked messages.
+     * @param tickDuration
+     *            granularity of timeout checking for unacked messages. tickDuration influence timeout accuracy, if set
+     *            ackTimeout = 10 and tickDuration = 2, actual ackTimeout will be 10 to 12.
+     * @param timeUnit
+     *            unit in which the timeout is provided.
+     */
+    ConsumerBuilder<T> ackTimeout(long ackTimeout, long tickDuration, TimeUnit timeUnit);
 
 Review comment:
   I'd rather not expose this in API, unless there are strong reason to chose different values of `tickDuration`. I'd prefer that we just pick a reasonable value in the implementation that can work well in most cases, just to avoid overloading the user with too many options.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services