gunli commented on PR #1059:
URL: 
https://github.com/apache/pulsar-client-go/pull/1059#issuecomment-1644969155

   > The user can call the `flush` and then call the `close`. IMO, the `close` 
means that we are going to terminate the producer and release all the 
resources. If there are any ongoing requests, we need to fail them.
   
   Hmm, this implies that users must call flush() before closing, and if they 
do so but still have unsent data, it looks like that the flush() implementation 
is not perfect. On the other hand, if users don't call flush(), they will have 
to bear the consequences themselves, in this case, it seems better to 
encapsulate flush() in close() to reduce the burden on users.
   
    It seems a bit contradictory.


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