Persi commented on a change in pull request #6905:
URL: https://github.com/apache/pulsar/pull/6905#discussion_r421648325



##########
File path: 
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/SchemaDefinition.java
##########
@@ -76,4 +78,18 @@
      * @return the flag of supportSchemaVersioning
      */
     boolean getSupportSchemaVersioning();
+
+    /**
+     * Get a configured schema reader.
+     *
+     * @return optional containing configured schema reader or empty optional 
if none is configure
+     */
+    Optional<SchemaReader<T>> getSchemaReaderOpt();

Review comment:
       This interface can be used for other schemas as well, but both 
SchemaReader and SchemaWriter as well. I see what you mean, did not recognize 
the Producer and Consumer instantiators with Schema as parameter. With that in 
mind, yes for me it would be a beeter solution to overload SChema.of instead of 
extending this general purpose interface.




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


Reply via email to