apache/pulsar-client-go

allow override the Schema Creator by a consumer

adrianiacobghiula opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
A consumer should be allowed to select / choose / override the default Schema. For example select to use https://github.com/hamba/avro and not github.com/linkedin/goavro/v2

Describe the solution you'd like
Allow the consumer in Options to set a different function as SchemaCreator

Can you highlight the benefits of using https://github.com/hamba/avro? Given that https://github.com/linkedin/goavro has yet to see updates in 2 years, it might be worthwhile considering replacing it with https://github.com/hamba/avro if we have compelling reasons.

@RobertIndie thanks for looking at the PR
I choose to use hamba because of avro to golang struct generation -> see avrogen.
Easier handling of "nullable" union. by having a field as pointer.
benchmark shows to be faster than linkedin.
There is a minus that hopefully with later versions can be covered: recursive structs not not covered.