Skip to content

Suppport for timeout in NatsClient.request method. #23

Description

@thedodd

As described in the Nats FAQ here, it is assumed that users should be able to specify timeouts when making requests (request/response pattern).

We can use tokio's timeout system to accomplish this fairly easily. End users could do this on their own, but it would be awesome to be able to encapsulate this functionality as an Option<Duration> arg to the methods to which this would apply.

How do you guys feel about this? I am happy to write the code for it. Should be dead simple. Literally just wrapping the future in a timeout if a delay is given, else the code stays the same.

Thoughts?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions