wolfstudy commented on a change in pull request #3904: [go schema] support go 
schema for pulsar-client-go
URL: https://github.com/apache/pulsar/pull/3904#discussion_r273311107
 
 

 ##########
 File path: pulsar-client-go/pulsar/c_producer.go
 ##########
 @@ -108,6 +108,14 @@ func createProducerAsync(client *client, options 
ProducerOptions, callback func(
                C.pulsar_producer_configuration_set_compression_type(conf, 
C.pulsar_compression_type(options.CompressionType))
        }
 
+       if options.SchemaInfo.Type != NONE {
+               C.pulsar_producer_configuration_set_schema_type(conf, 
C.pulsar_schema_type(options.SchemaInfo.Type),
+                       C.CString(options.Name), C.CString(options.Schema))
 
 Review comment:
   Yes, otherwise it will cause a memory leak

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to