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_r275131177
 
 

 ##########
 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)
 
        // Create a `Consumer` by subscribing to a topic.
        //
        // If the subscription does not exist, a new subscription will be 
created and all messages published after the
        // creation will be retained until acknowledged, even if the consumer 
is not connected
-       Subscribe(ConsumerOptions) (Consumer, error)
+       Subscribe(ConsumerOptions, Schema) (Consumer, error)
 
        // Create a Reader instance.
        // This method will block until the reader is created successfully.
-       CreateReader(ReaderOptions) (Reader, error)
+       CreateReader(ReaderOptions, Schema) (Reader, error)
 
 Review comment:
   For backward compatibility, can we do:
   
   ```
   CreateReader(ReaderOptions) (Reader, error)
   
   CreateReader(ReaderOptions, Schema) (Reader, error)
   ```
   
   If we can't do that, I would do followings:
   
   ```
   CreateReader(ReaderOptions) (Reader, error)
   
   CreateReader(ReaderOptions, Schema) (Reader, error)
   ```

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