Copilot commented on code in PR #1419:
URL: https://github.com/apache/pulsar-client-go/pull/1419#discussion_r2319508508


##########
pulsaradmin/pkg/admin/subscription.go:
##########
@@ -280,6 +281,9 @@ func handleResp(topic utils.TopicName, resp *http.Response) 
([]*utils.Message, e
                }
        }
 
+       if isBatch {
+               return getIndividualMsgsFromBatch(topic, ID, payload, 
properties)
+       }

Review Comment:
   The `properties` map is being shared between all individual messages in a 
batch. In `getIndividualMsgsFromBatch`, properties are being modified by adding 
single message properties to the same map reference, which means all messages 
in the batch will share the same properties map and accumulate properties from 
all messages in the batch. This should create a copy of the properties map for 
each individual message to avoid property contamination between messages.



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