merlimat commented on a change in pull request #5557: [Schema]Add SchemaDisabled for schema URL: https://github.com/apache/pulsar/pull/5557#discussion_r344342273
########## File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Schema.java ########## @@ -213,6 +213,16 @@ default void configureSchemaInfo(String topic, String componentName, return DefaultImplementation.newProtobufSchema(SchemaDefinition.builder().withPojo(clazz).build()); } + /** + * Disable SchemaInfo. + * + * @param schema instance + * @return a Schema instance of bytes type + */ + static <T> Schema<T> disabled(Schema<T> schema) { Review comment: > this is not about disabling schema validation. this is about disabling carrying schema information That was the point that "disabled" is not clear enough to convey what's being disabled. > We can choose a better name if SchemaDisabled is not accurate. but I don't think it should be added to producer or consumer configuration. Why not? To me it seems more of a producer/consumer property: the "schema" is the same, but you don't want to pass the schema info to broker. ---------------------------------------------------------------- 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