-
Notifications
You must be signed in to change notification settings - Fork 14
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
Doesn't seem to support kafka-python library version >= 2.0.0 #22
Comments
ah yes, the image of kafka used is very old and unsupported. This should be updated to use better images. The |
Hi @vangheem, thanks for the response! Kafka docker image (spotify/kafka) seems to be working fine, at least as of now. I needed to make following changes to containers/kafka.py to make it work with kafka-python version >= 2.0.0
Strangely, I also needed to introduce a 30s sleep before creating a client otherwise it crashes with "ValueError: Invalid file object". I still need to debug into it further for the exact reason. Looking at your code, I feel you were expecting a KafkaUnavailableError for the previous version which might not be happening in this version of kafka-python. |
Ok, as suspected, kafka-python no longer seems to be raising KafkaUnavailableError in case its not able to connect. I am able to make it work with the following changes for kafka-python latest version.
Although, ValueError seems to be little more generic exception to catch but it doesn't seem to be raising any Kafka specific exception to catch now. Please suggest, if any other way to handle it. |
Kafka fixture seems to be supporting kafka-python library version up to 1.4.7 only, not up to the latest version 2.0.2.
There seem to be few changes between kafka-python <=1.4.7 and >= 2.0.0
I can raise a PR to support it.
The text was updated successfully, but these errors were encountered: