nodece commented on code in PR #1340:
URL: https://github.com/apache/pulsar-client-go/pull/1340#discussion_r1985385864


##########
pulsar/consumer_partition.go:
##########
@@ -2256,12 +2306,14 @@ func convertToMessageID(id *pb.MessageIdData) 
*trackingMessageID {
 
        msgID := &trackingMessageID{
                messageID: &messageID{
-                       ledgerID: int64(*id.LedgerId),
-                       entryID:  int64(*id.EntryId),
+                       ledgerID:  int64(id.GetLedgerId()),
+                       entryID:   int64(id.GetEntryId()),
+                       batchIdx:  id.GetBatchIndex(),
+                       batchSize: id.GetBatchSize(),
                },
        }
-       if id.BatchIndex != nil {
-               msgID.batchIdx = *id.BatchIndex
+       if msgID.batchIdx == -1 {
+               msgID.batchIdx = 0

Review Comment:
   Why reset this value to 0? -1 is not the batch message, 0 is batch.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to