ivankelly commented on a change in pull request #2103: Issue 1433: Expose batch
flushAsync() and flush() methods in Producer
URL: https://github.com/apache/incubator-pulsar/pull/2103#discussion_r200953979
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -333,6 +335,7 @@ public void sendAsync(Message<T> message, SendCallback
callback) {
// batch size and/or max message size
if (batchMessageContainer.hasSpaceInBatch(msg)) {
batchMessageContainer.add(msg, callback);
+ lastSendFuture = callback.getFuture();
Review comment:
Can't we just assign lastSendFuture once, before calling
isBatchMessagingEnabled()? Once we get to that point, the message is going to
best sent in any case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services