confluent-kafka-python
confluent-kafka-python copied to clipboard
async SchemaRegistryClient
Description
SchemaRegistryClient is based on requests, which is basically sync. Therefore it is not suitable for async applications.
I suggest to implement AsyncSchemaRegistryClient based on aiohttp.
Actually we do not need this anymore.
We've implemented our own SchemaRegistryClient based on fastavro and httpx, which just calls REST endpoints.
It was pretty easy, I would recommend anyone doing the same, if you want absolute flexibility.
Does this even matter? I mean the schemas are cached so it's one sync call.
From today's perspective, it does not make any sense to ship confluent-kafka-python with schema registry client at all.
There are many http libraries (httpx, aiohttp, requests, ...) so that anybody can write own REST client according to their needs, using libraries they like.
Fixed by https://github.com/confluentinc/confluent-kafka-python/pull/1965