Skip to content

How to set timeout invoking service #399

Description

@wqliang

How to set a timeout per request when invokeService ?
invokeService will return a Mono, Mono.block(Duration.ofMills(3000)) and Mono.timeout(Duration.ofMills(3000)) seems not work as I expected. The default timeout of DaprHttp is 10s .
How can I invoke different service with different timeout with only one daprClient instance?

Activity

  1. artursouza commented on Dec 1, 2020

    @artursouza
    Contributor

    We don't support timeout setting in the SDK - but that could be added. Now, the SDK invokes Dapr sidecar via GRPC and not HTTP by default. So the change should be in GRPC first but implemented in both.

    Now, Dapr sidecar does not support timeout per request, so that would be another feature. Maybe it can be done via metadata.

  2. self-assigned this
    on Jan 13, 2021
  3. artursouza commented on Jan 19, 2021

    @artursouza
    Contributor

    This issue is caused by #434. gRPC API is fixed and the Mono.block(timeout) is working now. There is another PR fixing it for HTTP too.

  4. artursouza commented on Jan 19, 2021

    @artursouza
    Contributor

    By allowing Mono timeout, it does not seem to be a need for a runtime feature to set timeout. We will close this issue once the PR above is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions