You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by gi...@git.apache.org on 2017/07/13 17:58:23 UTC

[GitHub] saandrews commented on a change in pull request #564: Set timeouts on admin requests

saandrews commented on a change in pull request #564: Set timeouts on admin requests
URL: https://github.com/apache/incubator-pulsar/pull/564#discussion_r127287499
 
 

 ##########
 File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/PulsarAdmin.java
 ##########
 @@ -112,6 +112,10 @@ public PulsarAdmin(URL serviceUrl, ClientConfiguration pulsarConfig) throws Puls
         ClientConfig httpConfig = new ClientConfig();
         httpConfig.property(ClientProperties.FOLLOW_REDIRECTS, true);
         httpConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, 8);
+        httpConfig.property(ClientProperties.CONNECT_TIMEOUT, 5000);
+        if (pulsarConfig != null) {
+            httpConfig.property(ClientProperties.READ_TIMEOUT, pulsarConfig.getOperationTimeoutMs());
+        }
 
 Review comment:
   Looks good. Should we add it as command line param as well?
 
----------------------------------------------------------------
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