confluent-kafka-python
confluent-kafka-python copied to clipboard
Enhancement - use schema registry to validate provided schemas for Protobuf and Json deserialisers
Description
Not an issue but a possible enhancement request.
Currently the protobuf and json deserialisers do not interact with the schema registry (because they don't need to). However it might be useful to optionally check the schema registry to confirm that the provided schema is compatible with the schema used for serialisation?
Looking at the code it seems reasonably easy to implement by adapting the code from the Avro deserialiser. If @edenhill or others think it's useful I'm happy to do a pr.
How to reproduce
Checklist
Please provide the following information:
- [ ] confluent-kafka-python and librdkafka version (
confluent_kafka.version()andconfluent_kafka.libversion()): - [ ] Apache Kafka broker version:
- [ ] Client configuration:
{...} - [ ] Operating system:
- [ ] Provide client logs (with
'debug': '..'as necessary) - [ ] Provide broker log excerpts
- [ ] Critical issue