RobertIndie commented on code in PR #1255:
URL: https://github.com/apache/pulsar-client-go/pull/1255#discussion_r1690764848
##########
pulsar/client_impl.go:
##########
@@ -66,8 +66,10 @@ func newClient(options ClientOptions) (Client, error) {
if connectionMaxIdleTime == 0 {
connectionMaxIdleTime = defaultConnMaxIdleTime
} else if connectionMaxIdleTime > 0 && connectionMaxIdleTime <
minConnMaxIdleTime {
- return nil, newError(InvalidConfiguration,
fmt.Sprintf("Connection max idle time should be at least %f "+
- "seconds", minConnMaxIdleTime.Seconds()))
+ logger.Warnf("Connection idle detect interval seconds default
same as max idle seconds, but max idle"+
+ " seconds less than %d, to avoid checking"+
+ " connection status too much, use default value : %d",
minConnMaxIdleTime.Minutes(), minConnMaxIdleTime.Minutes())
+ connectionMaxIdleTime = minConnMaxIdleTime
Review Comment:
This is a misconfiguration. And IMO, we should throw an error for it instead
of the warning. Otherwise, the client's behavior may differ from what users
expect.
Are there any cases where this change is needed?
--
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]