hello. I have a custom java pulsar sink `Sink<Stri...
# general
m
hello. I have a custom java pulsar sink
Sink<String>
which is supposed to be running connected to a topic that has the schema set to String. However, when spawning the Sink without having previously created the topic or set the schema (basically a blank broker) I get greeted by an
IncompatibleSchemaException: "Topic does not have a schema to check"
. Doing the same with a
Source<String>
works perfectly fine and sets the schema accordingly. I think this is very unintuitive. because sub'ing with a python client on the blank broker and specifying the schema also sets the topic schema and allows me to connect. Is this a java problem? Or is this a sink problem? How would I handle this? I could probably opt to use
Sink<GenericObject>
or
Sink<Byte[]>
and cast to string, however I would not favor this approach for multiple reasons.
l
Good question. Please ask the question at https://github.com/apache/pulsar/discussions/categories/q-a so that the answer is available for others in the future.