eolivelli commented on a change in pull request #10267:
URL: https://github.com/apache/pulsar/pull/10267#discussion_r618123514
##########
File path: site2/docs/io-develop.md
##########
@@ -85,6 +85,46 @@ interface, which means you need to implement the {@inject:
github:`open`:/pulsar
`ack` |Acknowledge that the record is fully processed.
`fail`|Indicate that the record fails to be processed.
+## Handling Schema information
+
+Pulsar IO handles automatically the Schema and provides a strongly typed API
based on Java generics.
+If you know the Schema type that you are producing you can declare the Java
class relative to that type in your Sink declaration.
+
+```
+public class MySource implements Source<String> {
+ public Record<String> read() {}
+}
+```
+If you want to implement a Source that works with any schema then you go with
`byte[]` (of `ByteBuffer`) and use Schema.AUTO_PRODUCE_BYTES().
Review comment:
done
--
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]