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:
[email protected]
With regards,
Apache Git Services