confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

After Decoding mesaage, consumer should return schema ID

Open shivg7706 opened this issue 5 years ago • 2 comments

Description

If someone wants the schema id of message which consumer is going to consume(after some transformation) then there should be schema ID to serialize the data into schema.

How to reproduce

Instead of returning only the message from decode function it should also return schema id.

shivg7706 avatar Sep 23 '20 04:09 shivg7706

I'm not sure exactly what you're asking, but some commentary:

AFAICT from the implementation (schema_regsitry/avro.py), the reader schema is not necessarily registered in schema registry, so doesn't necessarily have an id. To get an id for the schema, you could add it to SR, then you would have the id associated with it.

Maybe you want the writer schema id to be exposed by the deserializer in addition to the data. This is kind of related to working with data with type determined on the fly (terminology 'generic deserializer' in other languages). That is not supported yet by the Python client AFAIK.

For more information, please provide a code example and a specific question related to that.

mhowlett avatar Oct 13 '20 16:10 mhowlett

@mhowlett you got the point. I am talking about generic serializer and deserializer.

shivg7706 avatar Oct 15 '20 04:10 shivg7706