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/02 16:16:42 UTC
How to send an avro schema based message using websocket apis
I was going through the producer api listed here:
https://pulsar.apache.org/docs/en/client-libraries-websocket/#producer-endpoint
It looks like the message payload can only be BASE64 encoded.
What if my message payload is in avro format?
Is there a way to use websocket api to send such a message.
Thanks
Sachin
Re: How to send an avro schema based message using websocket apis
Posted by Sijie Guo <gu...@gmail.com>.
Sachin,
Currently, WebSocket doesn't support schema. There is an in-progress work
to add this feature to the websocket.
At the same time, what you can do is:
- serialize the data into bytes using Avro
- encode the bytes using BASE64 encoding
- Sijie
On Wed, Dec 2, 2020 at 8:16 AM Sachin Mittal <sj...@gmail.com> wrote:
> I was going through the producer api listed here:
>
> https://pulsar.apache.org/docs/en/client-libraries-websocket/#producer-endpoint
>
> It looks like the message payload can only be BASE64 encoded.
> What if my message payload is in avro format?
>
> Is there a way to use websocket api to send such a message.
>
> Thanks
> Sachin
>
>