sijie commented on a change in pull request #5557: [Schema]Add SchemaDisabled
for schema
URL: https://github.com/apache/pulsar/pull/5557#discussion_r343517385
##########
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:
@merlimat this is not about disabling schema validation. this is about
disabling carrying schema information. this should be applied to both producer
and consumers. hence I think it should be a schema wrapper over existing schema
to turn off carrying schema information. 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.
----------------------------------------------------------------
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