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

 ##########
 File path: pulsar-client-go/pulsar/client.go
 ##########
 @@ -101,17 +101,17 @@ type ClientOptions struct {
 type Client interface {
        // Create the producer instance
        // This method will block until the producer is created successfully
-       CreateProducer(ProducerOptions) (Producer, error)
+       CreateProducer(ProducerOptions, Schema) (Producer, error)
 
 Review comment:
   @merlimat I am not sure about that. 
   
   a) if we are following Java, it is better to have schema as a separated 
argument.
   b) schema is not an `option`. it is a long-live go instance during the 
lifecycle of a producer/consumer. but options are only used during 
construction. after they are passed to cpp client's configuration, the go 
options are not used anymore. 
   
   so I don't think it is a good idea to add schema to the options.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to