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/02/21 07:18:29 UTC

[GitHub] [pulsar-client-go] sunby opened a new issue #733: Producer can not reconnect to broker if server restart

sunby opened a new issue #733:
URL: https://github.com/apache/pulsar-client-go/issues/733


   #### Expected behavior
   
   Producer reconnect to broker after server restart.
   
   #### Actual behavior
   
   In the current code, I find that if a connection is closed, it will try to stop all producer listeners and consumer handlers registered on it. But if the producer has set the connection to `conn` and does not register the listener to this connection in https://github.com/apache/pulsar-client-go/blob/1df5596aa7a351c6f43edb53f54b2a14b83b0073/pulsar/producer_partition.go#L264-L265. And the connection is closed by another goroutine because of `connection.handleSendError` https://github.com/apache/pulsar-client-go/blob/1df5596aa7a351c6f43edb53f54b2a14b83b0073/pulsar/internal/connection.go#L793. The producer can not do `reconnectToBroker` because no signal will sent to `connectClosedCh`. 
   
   Maybe we should check the result of `RegisterListener` and call `ConnectionClosed` by manually?
   #### Steps to reproduce
   
   It's not stable to reproduce
   
   #### System configuration
   **Pulsar version**: x.y
   


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