You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/02/06 15:34:55 UTC
(pulsar) branch branch-4.0 updated (705a99d1109 -> f06f3eee542)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a change to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
from 705a99d1109 [improve][client] Make authorization server metadata path configurable in AuthenticationOAuth2 (#25052)
new 144e064c145 [improve][broker] Add idle timeout support for http (#25224)
new b38fe721500 [fix][sec] Upgrade jose4j to 0.9.6 to address CVE-2024-29371 (#25095)
new f06f3eee542 [fix][build][branch-4.0] Fix LICENSE.bin.txt
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
conf/broker.conf | 3 +++
conf/proxy.conf | 6 ++++++
conf/standalone.conf | 5 ++++-
distribution/server/src/assemble/LICENSE.bin.txt | 2 +-
pom.xml | 2 +-
.../org/apache/pulsar/broker/ServiceConfiguration.java | 6 ++++++
.../java/org/apache/pulsar/broker/web/WebService.java | 6 +++++-
.../org/apache/pulsar/proxy/server/AdminProxyHandler.java | 2 ++
.../apache/pulsar/proxy/server/ProxyConfiguration.java | 15 +++++++++++++++
.../java/org/apache/pulsar/proxy/server/WebServer.java | 6 +++++-
10 files changed, 48 insertions(+), 5 deletions(-)
(pulsar) 01/03: [improve][broker] Add idle timeout support for http (#25224)
Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 144e064c145613f697933f5e959770b1ee3f81d5
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Fri Feb 6 23:02:58 2026 +0800
[improve][broker] Add idle timeout support for http (#25224)
(cherry picked from commit 63220eadcfc11f43d4537327a3593603ee5be697)
---
conf/broker.conf | 3 +++
conf/proxy.conf | 6 ++++++
conf/standalone.conf | 5 ++++-
.../org/apache/pulsar/broker/ServiceConfiguration.java | 6 ++++++
.../java/org/apache/pulsar/broker/web/WebService.java | 6 +++++-
.../org/apache/pulsar/proxy/server/AdminProxyHandler.java | 2 ++
.../apache/pulsar/proxy/server/ProxyConfiguration.java | 15 +++++++++++++++
.../java/org/apache/pulsar/proxy/server/WebServer.java | 6 +++++-
8 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/conf/broker.conf b/conf/broker.conf
index 25e5bcc15cc..503a7a0e11f 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -1067,6 +1067,9 @@ httpServerThreadPoolQueueSize=8192
# Capacity for accept queue in the HTTP server
httpServerAcceptQueueSize=8192
+# Idle timeout for HTTP server connections in milliseconds
+httpServerIdleTimeout=30000
+
# Maximum number of inbound http connections. (0 to disable limiting)
maxHttpServerConnections=2048
diff --git a/conf/proxy.conf b/conf/proxy.conf
index 10e5cdfd00d..0cfb554cf80 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -315,6 +315,9 @@ httpServerThreadPoolQueueSize=8192
# Capacity for accept queue in the HTTP server
httpServerAcceptQueueSize=8192
+#Idle timeout for HTTP server connections in milliseconds
+httpServerIdleTimeout=30000
+
# Maximum number of inbound http connections. (0 to disable limiting)
maxHttpServerConnections=2048
@@ -326,6 +329,9 @@ maxConcurrentHttpRequests=1024
# denial of service attacks.
httpMaxRequestHeaderSize = 8192
+# The idle timeout value for HTTP proxy is in millisecond
+httpProxyIdleTimeout=30000
+
## Configure the datasource of basic authenticate, supports the file and Base64 format.
# file:
# basicAuthConf=/path/my/.htpasswd
diff --git a/conf/standalone.conf b/conf/standalone.conf
index 091cbf5661f..f9c7ccb658f 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -1432,4 +1432,7 @@ topicCompactionRetainNullKey=false
# If value is "org.apache.pulsar.compaction.EventTimeCompactionServiceFactory",
# will create topic compaction service based on message eventTime.
# By default compaction service is based on message publishing order.
-compactionServiceFactoryClassName=org.apache.pulsar.compaction.PulsarCompactionServiceFactory
\ No newline at end of file
+compactionServiceFactoryClassName=org.apache.pulsar.compaction.PulsarCompactionServiceFactory
+
+# Idle timeout for HTTP server connections in milliseconds
+httpServerIdleTimeout=30000
\ No newline at end of file
diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index c70ae2bb5ee..dede4543fc3 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -347,6 +347,12 @@ public class ServiceConfiguration implements PulsarConfiguration {
)
private int httpServerAcceptQueueSize = 8192;
+ @FieldContext(
+ category = CATEGORY_HTTP,
+ doc = "Idle timeout for HTTP server connections in milliseconds."
+ )
+ private int httpServerIdleTimeout = 30 * 1000;
+
@FieldContext(category = CATEGORY_SERVER, doc = "Maximum number of inbound http connections. "
+ "(0 to disable limiting)")
private int maxHttpServerConnections = 2048;
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
index 96e8a516a6c..7fa954948a8 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
@@ -134,6 +134,7 @@ public class WebService implements AutoCloseable {
httpConfig.addCustomizer(new ForwardedRequestCustomizer());
}
httpConfig.setRequestHeaderSize(pulsar.getConfig().getHttpMaxRequestHeaderSize());
+ httpConfig.setIdleTimeout(pulsar.getConfig().getHttpServerIdleTimeout());
HttpConnectionFactory httpConnectionFactory = new HttpConnectionFactory(httpConfig);
if (port.isPresent()) {
List<ConnectionFactory> connectionFactories = new ArrayList<>();
@@ -191,7 +192,10 @@ public class WebService implements AutoCloseable {
}
// Limit number of concurrent HTTP connections to avoid getting out of file descriptors
- connectors.forEach(c -> c.setAcceptQueueSize(config.getHttpServerAcceptQueueSize()));
+ connectors.forEach(c -> {
+ c.setAcceptQueueSize(config.getHttpServerAcceptQueueSize());
+ c.setIdleTimeout(pulsar.getConfig().getHttpServerIdleTimeout());
+ });
server.setConnectors(connectors.toArray(new ServerConnector[connectors.size()]));
filterInitializer = new FilterInitializer(pulsar);
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
index 090f2f4a384..e4a38d7a0be 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
@@ -126,6 +126,8 @@ class AdminProxyHandler extends ProxyServlet {
protocolHandlers.put(new RedirectProtocolHandler(httpClient));
}
+ httpClient.setIdleTimeout(config.getHttpProxyIdleTimeout());
+
setTimeout(config.getHttpProxyTimeout());
}
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
index 0bb8c51ede0..cee0a2ca47d 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
@@ -801,6 +801,14 @@ public class ProxyConfiguration implements PulsarConfiguration {
)
private int httpProxyTimeout = 5 * 60 * 1000;
+ @FieldContext(
+ minValue = 0,
+ category = CATEGORY_HTTP,
+ doc = "Http proxy idle timeout.\n\n"
+ + "The idle timeout value for HTTP proxy is in millisecond."
+ )
+ private int httpProxyIdleTimeout = 30 * 1000;
+
@FieldContext(
minValue = 1,
category = CATEGORY_HTTP,
@@ -825,6 +833,13 @@ public class ProxyConfiguration implements PulsarConfiguration {
)
private int httpServerAcceptQueueSize = 8192;
+ @FieldContext(
+ minValue = 0,
+ category = CATEGORY_HTTP,
+ doc = "Idle timeout for HTTP server connections in milliseconds."
+ )
+ private int httpServerIdleTimeout = 30 * 1000;
+
@FieldContext(category = CATEGORY_SERVER, doc = "Maximum number of inbound http connections. "
+ "(0 to disable limiting)")
private int maxHttpServerConnections = 2048;
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/WebServer.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/WebServer.java
index 3c472135bdf..1d0d03d1dc7 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/WebServer.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/WebServer.java
@@ -114,6 +114,7 @@ public class WebServer {
}
httpConfig.setOutputBufferSize(config.getHttpOutputBufferSize());
httpConfig.setRequestHeaderSize(config.getHttpMaxRequestHeaderSize());
+ httpConfig.setIdleTimeout(config.getHttpServerIdleTimeout());
HttpConnectionFactory httpConnectionFactory = new HttpConnectionFactory(httpConfig);
if (config.getWebServicePort().isPresent()) {
@@ -167,7 +168,10 @@ public class WebServer {
}
// Limit number of concurrent HTTP connections to avoid getting out of file descriptors
- connectors.stream().forEach(c -> c.setAcceptQueueSize(config.getHttpServerAcceptQueueSize()));
+ connectors.stream().forEach(c -> {
+ c.setAcceptQueueSize(config.getHttpServerAcceptQueueSize());
+ c.setIdleTimeout(config.getHttpServerIdleTimeout());
+ });
server.setConnectors(connectors.toArray(new ServerConnector[connectors.size()]));
filterInitializer = new FilterInitializer(config, authenticationService);
(pulsar) 02/03: [fix][sec] Upgrade jose4j to 0.9.6 to address CVE-2024-29371 (#25095)
Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit b38fe721500470c74aaf4a3615cb05746c272b6e
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Mon Dec 22 10:06:46 2025 +0200
[fix][sec] Upgrade jose4j to 0.9.6 to address CVE-2024-29371 (#25095)
(cherry picked from commit 3fb52c5d7494d4020956b7a26db5e9e721c7d555)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f9ef7c238b1..e5a9db72e30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -281,7 +281,7 @@ flexible messaging model and an intuitive client API.</description>
<jakarta.validation.version>2.0.2</jakarta.validation.version>
<jna.version>5.12.1</jna.version>
<kubernetesclient.version>18.0.0</kubernetesclient.version>
- <jose4j.version>0.9.4</jose4j.version>
+ <jose4j.version>0.9.6</jose4j.version>
<okhttp3.version>5.3.1</okhttp3.version>
<!-- use okio version that matches the okhttp3 version -->
<okio.version>3.16.3</okio.version>
(pulsar) 03/03: [fix][build][branch-4.0] Fix LICENSE.bin.txt
Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit f06f3eee542ca9e9cf230f3353df18ec8d623659
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Fri Feb 6 17:32:34 2026 +0200
[fix][build][branch-4.0] Fix LICENSE.bin.txt
---
distribution/server/src/assemble/LICENSE.bin.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt
index 717375acf47..7ea0ea3860b 100644
--- a/distribution/server/src/assemble/LICENSE.bin.txt
+++ b/distribution/server/src/assemble/LICENSE.bin.txt
@@ -541,7 +541,7 @@ The Apache Software License, Version 2.0
- io.opentelemetry.instrumentation-opentelemetry-runtime-telemetry-java17-2.21.0-alpha.jar
- io.opentelemetry.instrumentation-opentelemetry-runtime-telemetry-java8-2.21.0-alpha.jar
- io.opentelemetry.semconv-opentelemetry-semconv-1.37.0.jar
- - com.google.cloud.opentelemetry-detector-resources-support-0.33.0.jar
+ - com.google.cloud.opentelemetry-detector-resources-support-0.36.0.jar
- io.opentelemetry.contrib-opentelemetry-gcp-resources-1.48.0-alpha.jar
* Spotify completable-futures
- com.spotify-completable-futures-0.3.6.jar