shibd commented on code in PR #321:
URL: https://github.com/apache/pulsar-client-cpp/pull/321#discussion_r1339471012


##########
lib/AckGroupingTracker.cc:
##########
@@ -84,29 +94,43 @@ void AckGroupingTracker::doImmediateAck(const 
std::set<MessageId>& msgIds, Resul
         return;
     }
 
+    std::set<MessageId> ackMsgIds;
+
+    for (const auto& msgId : msgIds) {
+        if (auto chunkMessageId =
+                
std::dynamic_pointer_cast<ChunkMessageIdImpl>(Commands::getMessageIdImpl(msgId)))
 {
+            auto msgIdList = chunkMessageId->moveChunkedMessageIds();
+            
doImmediateAck(std::set<MessageId>(std::make_move_iterator(msgIdList.begin()),
+                                               
std::make_move_iterator(msgIdList.end())),
+                           callback);

Review Comment:
   +1 that will make the code more clear.



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