RobertIndie commented on code in PR #21048:
URL: https://github.com/apache/pulsar/pull/21048#discussion_r1310245279


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageTracker.java:
##########
@@ -138,8 +138,11 @@ public void run(Timeout t) throws Exception {
                         if (!headPartition.isEmpty()) {
                             log.info("[{}] {} messages will be re-delivered", 
consumerBase, headPartition.size());
                             headPartition.forEach(messageId -> {
-                                
addChunkedMessageIdsAndRemoveFromSequenceMap(messageId, messageIds, 
consumerBase);
-                                messageIds.add(messageId);
+                                if (messageId instanceof ChunkMessageIdImpl) {
+                                    
addChunkedMessageIdsAndRemoveFromSequenceMap(messageId, messageIds, 
consumerBase);
+                                } else {
+                                    messageIds.add(messageId);

Review Comment:
   Added a new test `testTrackChunkedMessageId` to cover it.



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