Thanks Xiaolong for starting this. I think one other aspect to look into is how to fit in nicely in the language conventions. For example, in Go, there's already a pre-defined way to configure JSON serialization for a struct.
>> func NewJsonSchema(jsonAvroSchemaDef string, properties map[string]string) >> *JsonSchema { A user, in most cases should not be required to know the AVRO definition for its own JSON struct, rather we should extract automatically. Similarly, Avro library might have a way to generate a schema from a struct definition. Also, since the encode/decode are done in library, the way to pass the message content is different. Right now we're taking `[]byte` only. It would be good to have the entire example on how it would look like end to end. Finally, I'd say that if we can find a good solution, we could also potentially "break" the API at this point if the need arises (Since we're at 0.1.1 version). -- Matteo Merli <matteo.me...@gmail.com> On Thu, Aug 6, 2020 at 1:54 PM Sijie Guo <guosi...@gmail.com> wrote: > > I think we can follow what Java client does for supporting multiple > schemas. Does it work for you? > > - Sijie > > On Thu, Aug 6, 2020 at 1:12 PM Yuva raj <uvar...@gmail.com> wrote: > > > Thanks for bringing this up xiaolong. This is very much needed feature. > > Overall looks good . Adding schema in producer options will make one schema > > bound to one producer. This works most of the time. But We produce multiple > > different types of messages in single topic (Ex avro: userCreated , > > accountCreated). It would be great if we can allow providing schema > > details when sending an message so that we don't need to create one > > producer per type. Please let me know your thoughts on this. > > > > On Thu, Aug 6, 2020, 7:24 AM xiaolong ran <ranxiaolong...@gmail.com> > > wrote: > > > > > Hello all: > > > > > > Type safety is extremely important in any application built around a > > > message bus like Pulsar. > > > Currently, Apache Pulsar supports the function of Schema Registry. And > > > Java, CPP and > > > Python clients already support schema registry related functions, In > > order > > > to further improve > > > the function of Go Client, we need to support the function of Schema > > > Registry in Go Client. > > > > > > > > > The proposal is in: > > > > > > https://gist.github.com/wolfstudy/e0c9b349cd405715a9e04dd8658510bc < > > > https://gist.github.com/wolfstudy/e0c9b349cd405715a9e04dd8658510bc> > > > > > > Looking forward to any feedback. > > > > > > > > > -- > > > Thanks > > > Xiaolong Ran > >