We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 742f1b1 commit ff7b771Copy full SHA for ff7b771
pulsar/producer_partition.go
@@ -353,6 +353,15 @@ func (p *partitionProducer) reconnectToBroker() {
353
p.log.WithField("cnx", p.cnx.ID()).Info("Reconnected producer to broker")
354
return
355
}
356
+
357
+ if p.cnx != nil {
358
+ p.cnx.UnregisterListener(p.producerID)
359
+ state := p.cnx.getState()
360
+ if state == connectionClosing || state == connectionClosed {
361
+ p.cnx.close()
362
+ }
363
364
365
errMsg := err.Error()
366
if strings.Contains(errMsg, errTopicNotFount) {
367
// when topic is deleted, we should give up reconnection.
0 commit comments