Open davidmontgom opened 3 years ago
Any updates on this? Having the same issue
@davidmontgom & @krlx - I had a similar problem and resolved it by awaiting the future in CustomTokenProvider. Try this change
async def token(self):
return await asyncio.get_running_loop().run_in_executor(
None, self._token)
It seems that the documentation is inconsistent with the fixes provided by @mtomilov.
https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.abc.AbstractTokenProvider.token
I'd be happy to submit a PR for this. Should this issue be closed?
Hi @benschumacher,
The build of docs was broken at the time of the latest release, that's why the stable
docs wasn't updated. But you can see these changes in the latest
: https://aiokafka.readthedocs.io/en/latest/api.html#aiokafka.abc.AbstractTokenProvider.token
If you still think something have to be fixed, contributions are welcome.
Thanks for the reply. We made a change to await
from the token provider and it is working as expected. I was confused about the mismatch between the published docs and what the code comments had, but the doc build being broken clarifies that. Cheers.
Hi,
python-kafka simply works with oauthbearer. With aiokafka there are zero examples I am flying blind.
Did I impelent CustomTokenProvider correct? the create_ssl_context() function is what i use in python-kafka
Below is the error I get:
The above exception was the direct cause of the following exception:
Below is my code: