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


##########
pulsar/producer_partition.go:
##########
@@ -520,7 +520,8 @@ func (p *partitionProducer) internalSend(request 
*sendRequest) {
        }
 
        // if msg is too large
-       if len(payload) > int(p._getConn().GetMaxMessageSize()) {
+       if len(payload) > int(p._getConn().GetMaxMessageSize()) && 

Review Comment:
   Seems that in this PR we do the compression twice when sending the message. 
The batch builder will do the compression here: 
https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/commands.go#L251
   Could we move the compression from the batch builder to 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