sijie commented on a change in pull request #5165: [PIP-43] Support producer to send msg with different schema URL: https://github.com/apache/pulsar/pull/5165#discussion_r324254292
########## File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Producer.java ########## @@ -107,10 +107,19 @@ */ TypedMessageBuilder<T> newMessage(); + /** + * Create a new message builder with schema specified explicitly, + * + * @return a typed message builder that can be used to construct the message to be sent through this producer + * @since 2.5.0 + * @see #newMessage() + */ + TypedMessageBuilder<T> newMessage(Schema<T> schema); Review comment: it seems to me that this method is a bit confusing. T is the original type, no? shouldn't it be a different type? ``` <V> TypedMessageBuilder<V> newMessage(Schema<V> schema); ``` ---------------------------------------------------------------- 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