-
Notifications
You must be signed in to change notification settings - Fork 915
Integrate client with Confluent schema registry and Avro #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@criccomini All the components you mention sound fine, this is essentially what I would do. Given how small the overrides are for send/receive, I might not even make it pluggable in the same way the Java ones are. Python's duck typing makes this a lot easier to just wrap the two locations that need serialization with normal overloads, so a simple The one question I have is whether we want it in this repo. Were you thinking about moving |
Not sure. I'm open to suggestions. One thing that I've seen work with Airflow is keeping everything in one package, but using setup.py
The second one would include the Avro dependencies. We could have |
@criccomini Ah, cool, |
Yep, exactly. As long as you don't touch the code that you don't need at runtime, you don't need to install the extra requirements. |
Seems reasonable then. @edenhill, any thoughts? |
Great work @criccomini! The |
@edenhill I think the point is that we can just house it all under this repository directly, without submodules, since python provides a reasonable way to exclude unneeded dependencies. This would be a bit different than our many-repos approach so far, but we end up doing this for other things as well, e.g. schema-registry has the service implementation, serializers, Connect converters etc. |
@edenhill And perhaps a bit more concretely, I imagine compared to doing
you could do something like
If you want the Avro/schema-registry enabled one instead of the bare |
Awesome, let's do it! |
Awesome. @edenhill @ewencp one other thing. It looks like you guys are Python2/Python3 compatible. We will implement the schema registry stuff to be compatible as well, BUT the encoding/decoding syntax changes a bit between Python 2 and Python 3. We're planning to just branch this portion of the code based on the Python runtime, so we'll have two different encode/decode util methods depending on the Python version. The second rub here is that Avro, itself, has different libraries between Python 2 and Python 3 (avro-python and avro-python3). We'll try and figure out what to do about this, but it might mean different extras_requires depending on the Python runtime. |
…ignment Add Consumer.Subscription() and Assignment() APIs
We are looking at integrating this client with the Confluent schema registry and Avro with this client. Proposal is to add a new submodule in this repo that has:
The wrapper would override send/receive methods on base producer/consumer, and pass the objects/bytes through the message serializer. The message serializer would, in turn, use the caching schema client to fetch the schema, and encode/decode the message. Wrapper would be pluggable so other serde implementations could be used as well (e.g. Thrift/Protobuf), though we're not planning to implement any others.
Does this sound OK?
/cc @roopahc
The text was updated successfully, but these errors were encountered: