You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/20 03:01:07 UTC
[GitHub] [pulsar-client-go] oryx2 commented on a change in pull request #611: feat: support multiple schema version for producer and consumer
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org