wolfstudy opened a new pull request, #761: URL: https://github.com/apache/pulsar-client-go/pull/761
Signed-off-by: xiaolongran <[email protected]> ### Motivation At present, it is assumed that there are multiple topics multiplexing the same TCP connection, then any topic may trigger the reconnection operation of this TCP connection. In the actual production environment, we see that a small number of producers will report the following errors: ``` time="2022-04-19T21:43:28+08:00" level=warning msg="Connection closed unable register listener id=41" local_addr="9.xcxx:43051" remote_addr="pulsar://1.xxxx:6650" ``` The specific code logic is as follows: https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/connection.go#L851-L855 We can see that when we try to register the producer, we will first check the status of the current connection. If the connection is closed, then we will not continue to register the producer object with the connection, but at the same time we will not do any processing and cause some topics to continue to hold the old connection before, causing the sending to time out. ### Modifications - return an error when unable to register listener -- 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]
