RobertIndie commented on code in PR #805:
URL: https://github.com/apache/pulsar-client-go/pull/805#discussion_r1001506222


##########
pulsar/consumer_partition.go:
##########
@@ -733,17 +796,38 @@ func (pc *partitionConsumer) MessageReceived(response 
*pb.CommandMessage, header
                pc.metrics.BytesReceived.Add(float64(len(payload)))
                pc.metrics.PrefetchedBytes.Add(float64(len(payload)))
 
-               msgID := newTrackingMessageID(
+               trackingMsgID := newTrackingMessageID(
                        int64(pbMsgID.GetLedgerId()),
                        int64(pbMsgID.GetEntryId()),
                        int32(i),
                        pc.partitionIdx,
                        ackTracker)
+               // set the consumer so we know how to ack the message id
+               trackingMsgID.consumer = pc
 
-               if pc.messageShouldBeDiscarded(msgID) {
-                       pc.AckID(msgID)
+               if pc.messageShouldBeDiscarded(trackingMsgID) {
+                       pc.AckID(trackingMsgID)
                        continue
                }
+
+               var msgID MessageID
+               if isChunkedMsg {
+                       ctx := pc.chunkedMsgCtxMap.get(msgMeta.GetUuid())
+                       if ctx == nil {
+                               // chunkedMsgCtxMap has closed because of 
consumer closed

Review Comment:
   Need to add a log here. 



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