smazurov commented on a change in pull request #575:
URL: https://github.com/apache/pulsar-client-go/pull/575#discussion_r679564244
##########
File path: pulsar/producer_partition.go
##########
@@ -353,7 +353,7 @@ func (p *partitionProducer) internalSend(request
*sendRequest) {
payload := msg.Payload
var schemaPayload []byte
var err error
- if p.options.Schema != nil {
+ if p.options.Schema != nil && msg.Value != nil {
Review comment:
I believe you can always bypass it on the consumer side if you don't
call it and just read the Payload. You could implement a custom schema, maybe,
but it would still be "hacky" for the use case I am proposing which is as a
watermill adapter. Their interface requires payload to be a `[]byte`, so we
would have to set that to nil, then add the actual value to an untyped property.
--
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]