merlimat commented on a change in pull request #158: Topic reader implementation
URL: https://github.com/apache/pulsar-client-go/pull/158#discussion_r362880370
 
 

 ##########
 File path: pulsar/consumer_partition.go
 ##########
 @@ -247,7 +294,7 @@ func (pc *partitionConsumer) MessageReceived(response 
*pb.CommandMessage, header
        if msgMeta.NumMessagesInBatch != nil {
                numMsgs = int(msgMeta.GetNumMessagesInBatch())
        }
-       messages := make([]*message, numMsgs)
+       messages := make([]*message, 0)
 
 Review comment:
   The problem here is that we are doing the filtering, so the actual number of 
messages might be lower than that

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to