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 2019/11/02 04:34:31 UTC

[GitHub] [pulsar-client-go] tuteng commented on a change in pull request #81: Add reconnect timeout after unload topic

tuteng commented on a change in pull request #81: Add reconnect timeout after unload topic
URL: https://github.com/apache/pulsar-client-go/pull/81#discussion_r341798840
 
 

 ##########
 File path: pulsar/impl_partition_producer.go
 ##########
 @@ -176,6 +176,8 @@ func (p *partitionProducer) ConnectionClosed() {
 func (p *partitionProducer) reconnectToBroker() {
 	p.log.Info("Reconnecting to broker")
 	backoff := internal.Backoff{}
+	// Delay one second to reconnect
+	time.Sleep(1 * time.Second)
 
 Review comment:
   I'm not sure if there is logic for multiple retries after a failure on the go client-side. in my test, I found that after the topic was unload, the topic on the broker side was in the fence state, but the client did not seem to be performing multiple retries, the producer side was blocked.
   You may be right, correctly handling this error `ServiceNotReady` and then try again many times should be able to solve this problem.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services