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
…pache#11971)

(cherry picked from commit 8b55636)
  • Loading branch information
zzzming authored and nicoloboschi committed Oct 8, 2021
1 parent a3f0ada commit 2a31adc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,14 @@ public class ProxyConfiguration implements PulsarConfiguration {
)
private int httpOutputBufferSize = 32*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 2a31adc

Please sign in to comment.