Open vmironichev opened 2 years ago
Can you please explain your use-case for using strings? As of now we only support serializing / deserializing valid GenericRecord / SpecificRecord (POJOs).
With confluent schema registry we were using same serialiser for key and value regardless if it was POJO or String or UUID.., e.g. AvroSerialiser was working with that types fine, in most of cases we are putting uuid as a message key which was serialised to avro format. Once I tried to use AWSKafkaAvroSerializer I've got exception mentioned above. So as I understood in case of uuids in kafka message keys I can't use AWSKafkaAvroSerializer but need to use StringSerialiser instead.
Can you please explain your use-case for using strings? As of now we only support serializing / deserializing valid GenericRecord / SpecificRecord (POJOs).
This is a common use case where Kafka keys are strings (or some other primitive type) and values are records. Confluent handles this transparently with a NonRecordContainer
that it interposes between primitives and the registry. Would be convenient if GSR had a similar facility so users didn’t have to implement it themselves.
Hi, Currently I'm exploring migration from Confluent schema registry to GSR and noticed different data serialisation behaviour when wanted to use GSR AVRO serialisation for string keys and got "Unsupported data type" exception in AVROUtils. I'm wondering if in case of primitive objects for serialisation I must use custom encoder? (in order to archive similar behaviour like in Cofnluent avro utils to encode primitive)? Please let me know what is recommendation of primitive types serialisation if I use GSR. Sorry, I'm new to GSR.
UPD: Code snippet (taken from AWS samples) enriched with messageKey to trigger exception:
Avro schema
Thanks, Valeriy