wenbingshen commented on issue #676:
URL: 
https://github.com/apache/pulsar-client-go/issues/676#issuecomment-984237837


   @cckellogg The second point is a bit wrong. 
   1 - producer-1 with name `my-producer` is connected to a broker on topic-1
   2 - app tries to create new producer producer-1 with the same name 
`my-producer` for topic-1
   3 - the broker sends back an error saying producer with name `my-producer` 
is already connected to the topic-1
   
   Because the client does not provide `producerName` manually, if ` 
producer-2` is created at the second point, the pulsar server will return a 
completely different `producerName`, such as `my-producer-2`.
   
   Because of this, at the first point, the client address is 
`ab.cd.22.174:44352`,  and at the second point, the client address is 
`ab.cd.22.174:49750` , and when the second point occurs, the first point’s that 
client address is still not disconnected with pulsar broker. Therefore, the 
pulsar broker cannot clear the related producer information on the server side, 
causing the new connection to repeatedly execute `pb.BaseCommand_PRODUCER` in 
the `reconnectToBroker` retry logic.
   
   I don't understand the go language, but I roughly read the implementation of 
pulsar-client-go about connection. Although there is no evidence that the 
`reconnectToBroker` logic is entered when the old connection is not closed, it 
does happen.
   
   Because you are more familiar with this, can you do some investigation on 
it? Thanks.
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to