Skip to content

Commit

Permalink
[Issue-11966][pulsar-proxy] set default http proxy request timeout (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzming committed Oct 6, 2021
1 parent 86b2a21 commit 8b55636
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -95,6 +95,8 @@ class AdminProxyHandler extends ProxyServlet {
: config.getBrokerWebServiceURL();
this.functionWorkerWebServiceUrl = config.isTlsEnabledWithBroker() ? config.getFunctionWorkerWebServiceURLTLS()
: config.getFunctionWorkerWebServiceURL();

super.setTimeout(config.getHttpProxyTimeout());
}

@Override
Expand Down
Expand Up @@ -490,6 +490,14 @@ public class ProxyConfiguration implements PulsarConfiguration {
)
private int httpInputMaxReplayBufferSize = 5 * 1024 * 1024;

@FieldContext(
minValue = 1,
category = CATEGORY_HTTP,
doc = "Http proxy timeout.\n\n"
+ "The timeout value for HTTP proxy is in millisecond."
)
private int httpProxyTimeout = 30 * 1000;

@FieldContext(
minValue = 1,
category = CATEGORY_HTTP,
Expand Down

0 comments on commit 8b55636

Please sign in to comment.