-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Search before asking
- I searched in the issues and found nothing similar.
Version
main( ba1a7e1 )
Minimal reproduce step
- Create a producer with
batchingEnabled=false - Send some messages asynchronously
- Call
Producer#flushorProducer#flushAsync - (Close a producer)
- to get AlreadyClosed exception
pulsar-client-cpp/lib/ProducerImpl.cc
Lines 665 to 666 in ba1a7e1
// ensure any remaining send callbacks are called before calling the close callback failPendingMessages(ResultAlreadyClosed, false);
What did you expect to see?
When Producer#flush or Producer#flushAsync is called, wait for the completion of sending messages, even if non-batched messages.
What did you see instead?
Producer#flush and Producer#flushAsync don't guarantee the completion of sending non-batched messages.
Anything else?
Currently, ProducerImpl#flushAsync do nothing if batchMessageContainer_ is not initialized.
pulsar-client-cpp/lib/ProducerImpl.cc
Lines 331 to 333 in ba1a7e1
| } else { | |
| callback(ResultOk); | |
| } |
In Java client, wait last sent messages. We should implement C++ client like it.
apache/pulsar#2103
Are you willing to submit a PR?
- I'm willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels