oryx2 commented on a change in pull request #611:
URL: https://github.com/apache/pulsar-client-go/pull/611#discussion_r788311692



##########
File path: pulsar/producer_partition.go
##########
@@ -397,19 +460,48 @@ func (p *partitionProducer) internalSend(request 
*sendRequest) {
        msg := request.msg
 
        payload := msg.Payload
+
        var schemaPayload []byte
        var err error
-       if p.options.Schema != nil {
-               schemaPayload, err = p.options.Schema.Encode(msg.Value)
+       if msg.Value != nil && msg.Payload != nil {
+               p.log.Error("Can not set Value and Payload both")
+               return
+       }
+
+       if p.options.DisableMultiSchema {
+               if msg.Schema != p.options.Schema {

Review comment:
       Yes. Maybe I can compare the value of Schema with this.
   `msg.Schema != nil && p.options.Schema != nil && 
msg.Schema.GetSchemaInfo().hash() != p.options.Schema.GetSchemaInfo().hash()`




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