Open
Description
Description
AvroConsumer happily returns decoded Avro messages, but drops all reference to the original Avro schema/identifier. The schema is super-useful in some cases (eg. Debezium, where it contains the source database table schema).
One (relatively straightforward) solution is to:
- update
avro.MessageSerializer.decode_message()
to return a(schema_id, payload)
tuple - have
AvroConsumer.poll()
wrap theMessage
in a PythonAvroMessage
subclass which has additional.key_schema_id
and.value_schema_id
attributes. Could also do this in C. - expose the schema registry client via a
AvroConsumer.get_schema(schema_id)
method
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
): 0.11.0 - Apache Kafka broker version:
- Client configuration:
{...}
- Operating system:
- Provide client logs (with
'debug': '..'
as necessary) - Provide broker log excerpts
- Critical issue