Open wbarnha opened 6 months ago
If there are any messages pending, flush them before doing anything else. This makes it more likely that callbacks have a chance to run before the producer is closed, which can help in corner cases (like when callbacks want to send another message)
This change is
Is it possible to add a regression test for this?
regression tes
My thoughts as well, I'm wondering if the default behavior of not flushing was retained for a particular reason.
If there are any messages pending, flush them before doing anything else. This makes it more likely that callbacks have a chance to run before the producer is closed, which can help in corner cases (like when callbacks want to send another message)
This change is