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


##########
lib/ProducerImpl.cc:
##########
@@ -912,10 +912,9 @@ bool ProducerImpl::ackReceived(uint64_t sequenceId, 
MessageId& rawMessageId) {
 
     if (op.chunkedMessageId) {
         // Handling the chunk message id.
-        if (op.chunkId == 0) {
-            op.chunkedMessageId->setFirstChunkMessageId(messageId);
-        } else if (op.chunkId == op.numChunks - 1) {
-            op.chunkedMessageId->setLastChunkMessageId(messageId);
+        op.chunkMessageIdList.push_back(messageId);
+        if (op.chunkId == op.numChunks - 1) {
+            
op.chunkedMessageId->setChunkedMessageIds(std::move(op.chunkMessageIdList));
             messageId = op.chunkedMessageId->build();

Review Comment:
   BTW, this logic seems wrong? We create `OpSendMsgs` for each single chunk. 
It seems that `op.chunkMessageIdList` still has 1 item.



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