You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/22 14:20:24 UTC

[GitHub] [pulsar] poorbarcode commented on a diff in pull request #16165: [improve][client] [PIP-165] Auto release client useless connections

poorbarcode commented on code in PR #16165:
URL: https://github.com/apache/pulsar/pull/16165#discussion_r927701257


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ClientConfigurationData.java:
##########
@@ -124,6 +124,19 @@ public class ClientConfigurationData implements Serializable, Cloneable {
     )
     private int connectionsPerBroker = 1;
 
+    @ApiModelProperty(
+            name = "connectionMaxIdleSeconds",
+            value = "Release the connection if it is not used for more than [connectionMaxIdleSeconds] seconds. "
+                    + "If  [connectionMaxIdleSeconds] < 0, disabled the feature that auto release the idle connections"
+    )
+    private int connectionMaxIdleSeconds = 180;
+
+    @ApiModelProperty(
+            name = "connectionIdleDetectionIntervalSeconds",
+            value = "How often check idle connections"
+    )
+    private int connectionIdleDetectionIntervalSeconds = 60;

Review Comment:
   > The connectionMaxIdleSeconds should always >= connectionIdleDetectionIntervalSeconds?
   
   no such limit.
   
   >  is it able to remove this configuration? Instead, we can have an interval second based on the connectionMaxIdleSeconds to simplify the configuration.
   
   Good idea. Already fixed.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org