Make DirectStreamAPIImpl.getMessage request use the configured timeout #729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was getting weird timeouts when using the KV even though I was setting really high timeouts (20s or so), it turns out that the
get
implementation for the KV didn't pass any timeout, so the default one was being used (If I'm not mistaken it is 1s).I tried to use
this._request
, which I believe is better suited to avoid this kind of problem in the future, instead ofthis.nc.request
, but I was getting weird errors that I don't really understand, so I just added the timeout.I mentioned that
this._request
would be really helpful as it would allow for setting the timeout in a centralized manner. Plus, the fact that it implements some retry logic would be very very helpful for in some cases if I could simply pass some options from the client library to control this.