BewareMyPower commented on code in PR #18486:
URL: https://github.com/apache/pulsar/pull/18486#discussion_r1027621715


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java:
##########
@@ -656,6 +662,19 @@ public synchronized void reset() {
         flushRequired = false;
     }
 
+    public synchronized int compareTo(MessageId messageId) {
+        // The position of a message in the batch (BatchMessageIdImpl) must 
precede the batch itself (MessageIdImpl)
+        if (this.messageId instanceof BatchMessageIdImpl && (!(messageId 
instanceof BatchMessageIdImpl))) {
+            int result = ((BatchMessageIdImpl) 
this.messageId).toMessageIdImpl().compareTo(messageId);

Review Comment:
   I used `MessageIdImpl#messageIdCompare` instead, PTAL again.



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