shibd commented on code in PR #17739:
URL: https://github.com/apache/pulsar/pull/17739#discussion_r977497200


##########
pulsar-client-cpp/lib/ConsumerImpl.cc:
##########
@@ -925,9 +926,21 @@ void ConsumerImpl::acknowledgeAsync(const MessageId& 
msgId, ResultCallback callb
     doAcknowledgeIndividual(msgId, cb);
 }
 
+void ConsumerImpl::acknowledgeAsync(const MessageIdList& messageIdList, 
ResultCallback callback) {
+    ResultCallback cb = std::bind(&ConsumerImpl::statsAckCallback, 
shared_from_this(), std::placeholders::_1,
+                                  callback, 
proto::CommandAck_AckType_Individual, messageIdList.size());
+    // Currently not supported batch message id individual index ack.
+    this->ackGroupingTrackerPtr_->addAcknowledgeList(messageIdList);
+    for (const auto& messageId : messageIdList) {
+        this->unAckedMessageTrackerPtr_->remove(messageId);
+        this->batchAcknowledgementTracker_.deleteAckedMessage(messageId, 
proto::CommandAck::Individual);
+    }

Review Comment:
   I add new `remove(MessageIdList)` method on `UnAckedMessageTracker`, Since 
`BatchAcknowledgementTracker` not support `Individual` ack, so, I remove invoke 
`this->batchAcknowledgementTracker_.deleteAckedMessage` code. PTAL. Thanks.



-- 
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