BewareMyPower commented on code in PR #232:
URL: https://github.com/apache/pulsar-client-cpp/pull/232#discussion_r1150706547


##########
lib/ConsumerImpl.cc:
##########
@@ -1089,12 +1105,13 @@ void ConsumerImpl::acknowledgeAsync(const MessageId& 
msgId, ResultCallback callb
     const auto& msgIdToAck = pair.first;
     const bool readyToAck = pair.second;
     if (readyToAck) {
-        ackGroupingTrackerPtr_->addAcknowledge(msgIdToAck);
+        ackGroupingTrackerPtr_->addAcknowledge(msgIdToAck, callback);
+    } else {
+        if (callback) {

Review Comment:
   Yes. It has the same behavior with the Java client. See 
https://github.com/apache/pulsar/blob/7a99e74220bdff7a0dff3dbbf3befb2316f3a6c8/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L214
   
   Even if the actual CommandAck request is not sent, the shared bit set of 
these `BatchMessageIdImpl` instances has already been modified, which could be 
treated as acknowledged.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to