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


##########
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:
   Indeed, a similar mechanism exists in `BookKeeperClientFactoryImpl.java`; 
the specific code is as follows:
   ```
   PropertiesUtils.filterAndMapProperties(conf.getProperties(), "bookkeeper_")
           .forEach((key, value) -> {
               bkConf.setProperty(key, value);
           });
   ```
   
   This mechanism appears to be a simpler implementation; I will remove the 
corresponding configuration options.



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