-
Notifications
You must be signed in to change notification settings - Fork 233
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
Add support for zstd
compression
#501
Comments
Probably it will be easy after kafka-python supports it. |
Maybe it's time to add zstd, I read that it's available inside kafka-python (https://github.com/dpkp/kafka-python/blob/b0c59303fc71c287b001c83ca123d57c58085f1a/README.rst#compression and https://github.com/dpkp/kafka-python/blob/6f932ba71c150b6c03bf509829c35baa30f564b8/kafka/codec.py#L21) |
I'm new to aiokafka (to be frank, aio in general) however I'm also running into the need to utilize zstd. I certainly don't mind helping out where I can. Would anyone mind steering me in the right direction? I'm in the process of trying to understand the code base, but a gentle nudge would certainly be appreciated. |
@rjjanuary you have a base to work with my PR… I tried to add zstd, but I've something that fail on my MacBook Pro and I can't run tests (an issue with docker api) |
Thank you. I'll start digging in this evening. Thanks! |
@rjjanuary I've a big question to my myself about a possible change on my PR to by like kafka-python about that point, this is the possible change:
It's what I don't understand because during my test on my laptop, I obtain the same thing without and with this patch to be exactly like kafka-python so I don't know if we need this path inside aiokafka. edit: I tried and the difference is about |
Personally, I see no issues with your approach. Unfortunately I'm dealing with some issues in my project as well, causing issues with testing. I feel I'm still working to truly comprehend some of the basic concepts of aio in python. To me the programing paradigms are different enough that I struggle with understanding what it means to be a drop in replacement. |
I was with some little problem with a virtual env and when I recreated it and did: About the drop-in replacement, it's more about moving from kafka-python to aiokafka without a lot of refactorings, just replacing the library's name. It's what you can see in my patch (my other comment). If you can use it, it's perfect. |
Looks like this is done in #801. Would appreciate a release to get this available on PyPI |
getting below error when trying to consume from a ZSTD compressed record from kafka. raise UnsupportedCodecError( error log: Traceback (most recent call last): Process finished with exit code 1 My Code for consuming a kafka topic: from kafka import KafkaConsumer except KeyboardInterrupt: |
Zstandard support was added in Kafka 2.1.0 (KIP-110)
Would it be possible for aiokafka to support producing with zstd compression?
Thanks!
Related discussion in kafka-python: dpkp/kafka-python#1791
The text was updated successfully, but these errors were encountered: