pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] merlimat commented on a change in pull request #3848: [Issue-2122] [pulsar-client] Adding configuration for backoff strategy
Date Wed, 27 Mar 2019 06:27:32 GMT
merlimat commented on a change in pull request #3848: [Issue-2122] [pulsar-client] Adding configuration
for backoff strategy
URL: https://github.com/apache/pulsar/pull/3848#discussion_r269419091
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -1438,9 +1459,14 @@ public boolean hasMessageAvailable() throws PulsarClientException
{
         }
 
         AtomicLong opTimeoutMs = new AtomicLong(client.getConfiguration().getOperationTimeoutMs());
-        Backoff backoff = new Backoff(100, TimeUnit.MILLISECONDS,
-            opTimeoutMs.get() * 2, TimeUnit.MILLISECONDS,
-            0 , TimeUnit.MILLISECONDS);
+        Backoff backoff = new BackoffBuilder()
+                .setInitialTime(100, TimeUnit.MILLISECONDS)
 
 Review comment:
   I think the user defined time should just override the initial time here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message