fracasula commented on pull request #366:
URL: https://github.com/apache/pulsar-client-go/pull/366#issuecomment-693201408


   > Thanks @fracasula feedback, Here I tried to use the simplest code to 
simulate this problem, unfortunately, I did not reproduce it.
   
   Hi @wolfstudy, I don't understand why you're trying to replicate the bug 
with that code, it would be nearly impossible. I invite you to read the 
description of the issue in my first post again, I'll post it here below for 
convenience:
   
   > This is because some of the events travelling through the `eventsCh` 
channel rely on an open connection to finish. So if the `eventsCh` channel gets 
full with, say, in-flight `ackRequest` events, the `connectionClosed` event 
cannot be processed until the `ackRequest` are finished and the `ackRequest` 
cannot finish because the connection is closed and the `connectionClosed` event 
(which should trigger a reconnection to the broker) is stuck waiting to be 
pushed to the `eventsCh` channel.
   
   If you want a good chance to reproduce it **YOU MUST** try to have as much 
in-flight `ackRequest` events as possible (best if you ack in a separate go 
routine for parallelism) and **at the same time** close the connection multiple 
times to simulate the behaviour of errors like the `Received too big frame 
size` one. That is because `Received too big frame size` errors trigger a 
connection close (i.e. `r.cnx.TriggerClose()`).
   
   Please do run the test I provided that is already reproducing the bug, it 
doesn't take much to reverse engineer.
   


----------------------------------------------------------------
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]


Reply via email to