You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/14 03:42:30 UTC

[GitHub] [pulsar-client-cpp] equanz opened a new issue, #51: Producer#flush doesn't respect non-batched messages

equanz opened a new issue, #51:
URL: https://github.com/apache/pulsar-client-cpp/issues/51

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.
   
   
   ### Version
   
   main( https://github.com/apache/pulsar-client-cpp/commit/ba1a7e1c28ab186ed1d51b5cab47334cca1b2aea )
   
   
   ### Minimal reproduce step
   
   1. Create a producer with `batchingEnabled=false`
   2. Send some messages asynchronously
   3. Call `Producer#flush` or `Producer#flushAsync`
   4. (Close a producer)
     - to get AlreadyClosed exception
        https://github.com/apache/pulsar-client-cpp/blob/ba1a7e1c28ab186ed1d51b5cab47334cca1b2aea/lib/ProducerImpl.cc#L665-L666
   
   ### 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.
   https://github.com/apache/pulsar-client-cpp/blob/ba1a7e1c28ab186ed1d51b5cab47334cca1b2aea/lib/ProducerImpl.cc#L331-L333
   
   In Java client, wait last sent messages. We should implement C++ client like it.
   https://github.com/apache/pulsar/pull/2103
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] equanz commented on issue #51: Producer#flush doesn't respect non-batched messages

Posted by GitBox <gi...@apache.org>.
equanz commented on issue #51:
URL: https://github.com/apache/pulsar-client-cpp/issues/51#issuecomment-1314692442

   I'll close this issue because https://github.com/apache/pulsar-client-cpp/pull/98 was merged.
   Thank you @shibd


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] shibd commented on issue #51: Producer#flush doesn't respect non-batched messages

Posted by GitBox <gi...@apache.org>.
shibd commented on issue #51:
URL: https://github.com/apache/pulsar-client-cpp/issues/51#issuecomment-1294357493

   I reproduced it and I'll start fixing it.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] equanz closed issue #51: Producer#flush doesn't respect non-batched messages

Posted by GitBox <gi...@apache.org>.
equanz closed issue #51: Producer#flush doesn't respect non-batched messages
URL: https://github.com/apache/pulsar-client-cpp/issues/51


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org