How do you reject work with the GRPC ext client?
See original GitHub issueIn the dapr-ext-grpc documentation page, we see the following example for subscribing to TOPIC_A
on the pubsub
publish subscribe component.
@app.subscribe(pubsub_name='pubsub', topic='TOPIC_A')
def mytopic(event: v1.Event) -> None:
print(event.Data(),flush=True)
The document doesn’t say how one ACK
s a message. Are messages ACK
ed when the decorated function (mytopic
, in the example above) is called, or when it returns?
If a message is only ACK
ed when the decorated function returns, how do I prevent redelivery when the decorated function needs to do a long-running operation? Or how do I reject work until a long-running operation completes?
What happens if an exception is raised from the decorated function? Will dapr try to redeliver the message?
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Advanced gRPC Error Usage
One workaround for this is to register your error metadata messages with golang/protobuf through the goproto_registration extension.
Read more >How to use the @grpc/grpc-js.status function in @grpc/grpc-js
To help you get started, we've selected a few @grpc/grpc-js.status ... the decode as a string return reject(callErrorFromStatus({ code: grpc.status.
Read more >Re: Unable to connect to Cloud Run gRPC server
I'm trying to deploy a Cloud run gRPC server, by now I've accomplished the deployment but when I try to connect and call...
Read more >Authentication
Using client-side SSL/TLS. Now let's look at how Credentials work with one of our supported auth mechanisms. This is the simplest authentication ...
Read more >gRPC API Reference - Camunda Platform 8 Docs
As the gRPC server/client is based on generated code, keep in mind that any ... the job type, as defined in the BPMN...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One approach would be to allow the callback function to return a TopicEventResponse object.
#336 is my attempt at solving this issue following @wcs1only’s suggestion.
Please let me know if it needs improvements, as it’d be super nice for me to be able to intruct dapr to retry/reject messages when using the grpc client.