pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3848: [Issue-2122] [pulsar-client] Adding configuration for backoff strategy
Date Thu, 28 Mar 2019 06:14:56 GMT
sijie 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_r269868281
 
 

 ##########
 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:
   @merlimat are you thinking something like
   
   ```
   .setInitialTime(backoffIntervalNanos, TimeUnit.NANOS)
   ```

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