You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pulsar.apache.org by Sachin Mittal <sj...@gmail.com> on 2020/12/03 16:33:06 UTC
pulsar function changes the schema of output topic to JSON from AVRO
So,
I have created a simple function which copies the message from input topic
to output topic.
public class MirrorFunction implements Function<T, T> {
@Override
public T process(T input, Context ctx) {
...
return input;
}
}
The input topic message is stored in avro schema.
However when I check the schema of the output topic it has not changed to
json.
How can I ensure that output topic schema is also maintained as avro.
Thanks
Sachin
Re: pulsar function changes the schema of output topic to JSON from AVRO
Posted by Sijie Guo <gu...@gmail.com>.
Sachin - You can specify the schema of the output topic when you submit a
function.
Thanks,
Sijie
On Thu, Dec 3, 2020 at 8:33 AM Sachin Mittal <sj...@gmail.com> wrote:
> So,
> I have created a simple function which copies the message from input topic
> to output topic.
>
> public class MirrorFunction implements Function<T, T> {
>
> @Override
> public T process(T input, Context ctx) {
> ...
> return input;
> }
> }
>
> The input topic message is stored in avro schema.
> However when I check the schema of the output topic it has not changed to
> json.
>
> How can I ensure that output topic schema is also maintained as avro.
>
> Thanks
> Sachin
>
>