-
Couldn't load subscription status.
- Fork 367
Description
Expected behavior
When reconnecting to the server, the old connection should be closed.
Actual behavior
When reconnecting to the server, the old connection is not closed.
The following log progresses according to the timeline:
-
First, there is an active channel and producer that is writing data to the broker

-
In the case that the previous connection has not been disconnected, the client sends an add producer operation for the same producerName

-
This addition operation comes from the same ip of the client, a different port connection, and the producerName is equal to the previous one

-
Remove the producer in ServerCnx from the pulsar server, Producer getting producer busy is removing existing producer from list pulsar#11804, this PR modified the equals method of the Producer, resulting in the inability to remove the producer from the topic's prodcuers map.

-
Then the old connection starts to be disconnected, and the producer status of the server on the connection is cleared

- The new channel connection keeps retrying addProducer, and the producer is added successfully after closing the old connection.
Steps to reproduce
System configuration
Pulsar version: x.y
pulsar-client-go: 0.7.0
pulsar broker: 2.8.1
