sijie commented on a change in pull request #2397: Integrate Functions with
Schema
URL: https://github.com/apache/incubator-pulsar/pull/2397#discussion_r211364130
##########
File path:
pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
##########
@@ -161,15 +161,19 @@
/**
* Publish an object using serDe for serializing to the topic
- * @param topicName The name of the topic for publishing
- * @param object The object that needs to be published
- * @param serDeClassName The class name of the class that needs to be used
to serialize the object before publishing
+ *
+ * @param topicName
+ * The name of the topic for publishing
+ * @param object
+ * The object that needs to be published
+ * @param topicsPattern
+ * Either a builtin schema type (eg: "avro", "json",
"protobuf") or the class name of the custom schema class
* @return A future that completes when the framework is done publishing
the message
*/
- <O> CompletableFuture<Void> publish(String topicName, O object, String
serDeClassName);
+ <O> CompletableFuture<Void> publish(String topicName, O object, String
schemaType);
Review comment:
If we are enforcing schema here, why not change it to
```
<O> CompletableFuture<Void> publish(String topicName, O object, Schema<O>
schema);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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