-
Notifications
You must be signed in to change notification settings - Fork 127
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
[Feature Request] Async GRPC Subscriber (dapr-ext-grpc) #695
Comments
May you convert the issue to a bug reporting please? Mentioned types are part of DAPR java sdk, and they do not exist in Python sdk |
@siudeks this is generated code - generated from protos. Not all generated proto functionality is used in the Python SDK, and that is expected behavior. Please focus on the features you are looking for. The source is here: https://github.com/dapr/dapr/blob/master/dapr/README.md You can compile those protos to Python using the instructions here: That being said, just because something exists in the Dapr Runtime proto does not mean we are going to use it or implement it in the Python SDK. This is working as intended. |
If it makes things clearer, I will move the |
For some more background - the Dapr GRPC client is the only official way in Python to interact with GRPC. Using the protos directly is not supported by the Python SDK maintainers. https://github.com/dapr/python-sdk/tree/main/dapr/clients/grpc If you take a look there you will see that this imports and uses a subset of the generated functions from the private/internal proto package. The |
@berndverst if it is intended limitation -> I understand In my scenarios I consume events via gRpc connection with DAPR sidecar, so initially If there is a way to subscribe events using grpc connection with DAPR, where my listeners are async - in such case I will not require app callback generated classes |
@siudeks it should be pretty easy to make an async version of Let me change this issue into a feature request for an async grpc pubsub / events subscriber |
Some notes on desired implementation details: Just like we have The grpc connection needs to be established using And the internal topic / event handler registration needs to be changed to an awaitable type. Change functions to be awaitable, and await any results. |
How to import classes defined here?
The question is about grpc generated stuff like ListTopicSubscriptionsResponse, TopicSubscription, TopicEventRequest, TopicEventResponse etc. They are required to use DAPR in intellisense-friendly way, as the classes are part of DAPR appcallback interface.
They do not exist in DAPR-related pypi modules, what makes impossible to create type-safe code based on DAPR grpc callback services
The text was updated successfully, but these errors were encountered: