-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Consumer.partitions_for_topic requires metadata has already been fetched #1774
Comments
|
hey @dpkp, I recently ran into this issue as well in some scripts using version 1.4.2. The fix you described (fetching metadata with Interestingly enough, it seems to only affects our integration tests, not actual usage of our scripts |
I believe the java client has been updated to make a blocking request for metadata in |
Fixed by #1781 |
In `kafka-python` >= 1.4.5, `partitions_for_topic()` becomes a non-blocking call, which can cause problems if the local metadata cache is accessed before its populated: dpkp/kafka-python#1774 So we proactively make sure the metadata request/response cycles has finished and the cluster metadata cache is populated as part of the kafka client creation process. Also includes a few other minor fixups.
Consumer 'partitions_for_topic' method is not returning the proper value.
We have used the method : partitions_for_topic(topic) in our code, it was working fine with version 1.4.4 but getting an error in latest one (1.4.5)
The text was updated successfully, but these errors were encountered: