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

   > and if they do so but still have unsent data, it looks like that the 
flush() implementation is not perfect.
   
   The flush should guarantee that messages which are at least pushed into the 
data chan should be flushed to the broker. And that's the issue @Gleiphir2769 
has fixed:https://github.com/apache/pulsar-client-go/issues/1057.
   
   >  if users don't call flush(), they will have to bear the consequences 
themselves
   
   Yes. That's right. The user can choose to fail or flush the messages.
   
   IMO, the close should have only one responsibility: just close and release 
all the resources of the producer.
    I still think it's more important to keep the behavior consistent with the 
Java client. If we want to change this behavior, then we need to change it in 
the Java client first. And this needs a discussion on the mailing list. 
Besides, I still think it's better to fail the messages directly.
   
   


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