Copilot commented on code in PR #1435:
URL: https://github.com/apache/pulsar-client-go/pull/1435#discussion_r2490735343
##########
pulsar/internal/commands.go:
##########
@@ -118,6 +120,10 @@ func (r *MessageReader) ReadMessageMetadata()
(*pb.MessageMetadata, error) {
r.batched = true
}
+ if len(meta.Properties) > 0 {
+ r.hasProperties = true
+ }
Review Comment:
The `hasProperties` field is never reset between message reads when a
`MessageReader` is reused. If the same reader processes multiple messages and a
message without properties follows one with properties, `hasProperties` will
incorrectly remain true. Consider resetting this field in the `ResetBuffer()`
method or at the start of `ReadMessageMetadata()`.
--
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]