Search code examples
javagrpcmicronaut

Grpc client timeout (resilient configuration)


I'm trying to review the options to generate a resilient grpc client in micronaut, after reviewing the documentation I can see some retry options, but I've not been able to find how to setup a timeout for the call, can you help me?

https://micronaut-projects.github.io/micronaut-grpc/3.3.1/guide/index.html#client


Solution

  • Use deadlines as described here https://grpc.io/blog/deadlines/

    With Java stubs you can use withDeadlineAfter which allows you to specify a timeout.