LGouellec / streamiz

.NET Stream Processing Library for Apache Kafka 🚀
https://lgouellec.github.io/streamiz/
MIT License
470 stars 75 forks source link

How to serialize an Object using Avro Serializer where it is registered in the Schema Registry? #30

Closed Marc19 closed 4 years ago

LGouellec commented 4 years ago

Hi @Marc19, for moment Avro SerDes which interact with Schema Registry is not available. I plan this feature immediately in 0.3.0 beta release which should be released at the end of August. In parallel, I will try to give an example of code like a workaround.

Glad to see that Regards,

Marc19 commented 4 years ago

Hi @LGouellec, thanks man. Looking forward to it!

LGouellec commented 4 years ago

You have a workaround :

Do not hesitate, if you have any questions

++

Marc19 commented 4 years ago

I think I don't have access for the sample stream repo.

LGouellec commented 4 years ago

Retry, I made mistake in my comment

Marc19 commented 4 years ago

Thank you, I really appreciate your effort!

I'm not sure but I think my current problem is, that my object is auto registered in the schema registry when it is first produced in a Kafka topic. So, I would prefer not to define the schema manually like you did in the Person object.

So is there something I can do to achieve this?

LGouellec commented 4 years ago

With both modifications, it should be OK for your use case :)

LGouellec commented 4 years ago

Streamiz packages was released in 1.0.0 version. A new nuget packages with name : Streamiz.Kafka.Net.SchemaRegistry.SerDes.Avro was release too. It contains avro serdes which interact with Schema Registry.

Don't hesitate to test !! So I close this issue 😃