Description
Description
The new AvroDeserializer
class added in 1.4.0 requires a reader schema but this seems unnecessary and means that it's not possible to use these new classes in the same way as the old AvroConsumer
- i.e. in AvroConsumer
the default values for reader_key_schema
and reader_value_schema
are None
.
Specifically, we have use cases where we are just interested in consuming (and, say, displaying) whatever messages are forthcoming on a topic and it's sufficient - and indeed preferable - to just use the corresponding writer schema from the registry.
I would be happy to provide a PR addressing this, unless the reader schema requirement is deliberate for some reason.
(A couple of other minor issues I noticed while looking at schema_registry/avro.py
: i) the error messages about to_dict
not being callable have the arguments the wrong way around; ii) the attempt to raise a ValueError
about unrecognized properties will fail; the second call to format()
should be join()
instead.)
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
): 1.4.0