Search before asking
Version
main( ba1a7e1 )
Minimal reproduce step
- Create a producer with
batchingEnabled=false
- Send some messages asynchronously
- Call
Producer#flush or Producer#flushAsync
- (Close a producer)
- to get AlreadyClosed exception
|
// 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.
|
} 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?
Search before asking
Version
main( ba1a7e1 )
Minimal reproduce step
batchingEnabled=falseProducer#flushorProducer#flushAsyncpulsar-client-cpp/lib/ProducerImpl.cc
Lines 665 to 666 in ba1a7e1
What did you expect to see?
When
Producer#flushorProducer#flushAsyncis called, wait for the completion of sending messages, even if non-batched messages.What did you see instead?
Producer#flushandProducer#flushAsyncdon't guarantee the completion of sending non-batched messages.Anything else?
Currently,
ProducerImpl#flushAsyncdo nothing ifbatchMessageContainer_is not initialized.pulsar-client-cpp/lib/ProducerImpl.cc
Lines 331 to 333 in ba1a7e1
In Java client, wait last sent messages. We should implement C++ client like it.
apache/pulsar#2103
Are you willing to submit a PR?