eolivelli commented on a change in pull request #11238:
URL: https://github.com/apache/pulsar/pull/11238#discussion_r664703366
##########
File path:
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Schema.java
##########
@@ -426,6 +426,19 @@ default void configureSchemaInfo(String topic, String
componentName,
return DefaultImplementation.newAutoProduceSchema(schema);
}
+ /**
+ * Create a schema instance that accepts a serialized Avro payload
+ * without validating it against the schema specified.
+ * It can be useful when migrating data from existing event or message
stores.
+ *
+ * @return the auto schema instance
+ * @since 2.9.0
+ * @see #AUTO_PRODUCE_BYTES()
+ */
+ static Schema<byte[]> AUTO_PRODUCE_VALIDATED_AVRO_BYTES(Schema<?> schema) {
Review comment:
why not adding simply a method that creates a AUTO_PRODUCE_BYTES schema
without validation ?
```
static Schema<byte[]> AUTO_PRODUCE_BYTES(Schema<?> schema, boolean
validate) {
return DefaultImplementation.newAutoProduceSchema(schema, validate);
}
```
this "feature" will be useful for other Schemas other than Avro
@jerrypeng @sijie @codelipenghui @congbobo184
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]