lhotari commented on code in PR #25580:
URL: https://github.com/apache/pulsar/pull/25580#discussion_r3146415541


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -357,6 +357,31 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
             + "(0 to disable limiting)")
     private int maxHttpServerConnections = 2048;
 
+    @FieldContext(
+            category = CATEGORY_SERVER,
+            doc = "TCP keepalive time in seconds. This is the duration between 
the last data packet sent "
+                    + "(simple ACKs are not considered data) and the first 
keepalive probe. "
+                    + "Default is 7200 seconds (2 hours). "
+                    + "If set to 0, the system default value will be used."
+    )
+    private int tcpKeepAliveTimeSeconds = 0;
+
+    @FieldContext(
+            category = CATEGORY_SERVER,
+            doc = "TCP keepalive interval in seconds. This is the duration 
between subsequent keepalive probes, "
+                    + "if no acknowledgement is received from the peer. 
Default is 75 seconds. "
+                    + "If set to 0, the system default value will be used."
+    )
+    private int tcpKeepAliveIntervalSeconds = 0;
+
+    @FieldContext(
+            category = CATEGORY_SERVER,
+            doc = "TCP keepalive probe count. This is the number of 
unacknowledged probes to send before considering "
+                    + "the connection dead and notifying the application 
layer. Default is 9 probes. "
+                    + "If set to 0, the system default value will be used."
+    )
+    private int tcpKeepAliveProbeCount = 0;

Review Comment:
   These setting are specific to Pulsar. 
   There's already a solution to configure BookKeeper client options by 
prefixing the options with `bookkeeper_` in `broker.conf`. For Pulsar Helm 
chart, that would be `PULSAR_PREFIX_bookkeeper_`.
   
   
https://github.com/apache/pulsar/blob/33fe7559b4d1a2cfb9d35756d38f7bad72b54309/conf/broker.conf#L1253-L1257
   
   For example, this would be the way to configure BookKeeper client TCP 
keep-alive options for Pulsar Broker:
   ```
   "PULSAR_PREFIX_bookkeeper_tcpKeepIdle": "300"
   "PULSAR_PREFIX_bookkeeper_tcpKeepIntvl": "60"
   "PULSAR_PREFIX_bookkeeper_tcpKeepCnt": "5"
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to