pulsar-client-python
pulsar-client-python copied to clipboard
Implementation of the asyncio consumer
Hi, I implemented the asyncio consumer in a similar way as the producer. All missing async functions provided by the C++ library are now implemented in the pybind11 classes and I use futures in python to convert the functions with callbacks to async functions. The reason I started with this implementation is because I need the async consumer in a project with FastAPI myself. Tests could be a little bit patchy, for that reason i would appreciate help if i missed something
Traceback (most recent call last):
File "asyncio_test.py", line 27, in <module>
from pulsar.asyncio import (
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pulsar/asyncio.py", line 165, in <module>
class Consumer:
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pulsar/asyncio.py", line 216, in Consumer
async def seek(self, position: tuple[int, int, int, int] | pulsar.MessageId):
TypeError: 'type' object is not subscriptable
Could you also make the tests pass for Python 3.8? Though Python 3.8 will reach EOL on the next month (2024-10)
I will try to fix the issues this week.
I found another issue with the schema system in my asyncio implementation, i will fix this too before the next commit.
Let me fix the broken CI first
Could you rebase to master to resolve the conflicts and have the CI fixed?
@BewareMyPower I removed the binary files