Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for timeout propagation in async requests #616

Closed
dxxyy opened this issue Mar 18, 2022 · 1 comment
Closed

Support for timeout propagation in async requests #616

dxxyy opened this issue Mar 18, 2022 · 1 comment

Comments

@dxxyy
Copy link
Contributor

dxxyy commented Mar 18, 2022

Feature Request

Currently the methods handling the request/reply pattern exposed in the Connection class don't have support for propagating a timeout for async clients.

Use Case:

We are using the async request/reply pattern in our Java application. While testing at 10TPS, we have noticed high memory usage with reachable objects not being properly garbage collected in a timely manner.

The async clients using the request implementation in NatsConnection don't have the possibility to pass a timeout to the NatsRequestCompletableFuture being created, which is using a default hardcoded timeout of 10 minutes: NatsRequestCompletableFuture.

Proposed Change:

New API exposed, proposition in PR: #617

Who Benefits From The Change(s)?

Any client using the request/reply pattern in asynchronous way.

Alternative Approaches

Leave as is, I don't see an alternative as the current timeout is private and hardcoded in NatsRequestCompletableFuture

@dxxyy
Copy link
Contributor Author

dxxyy commented Mar 25, 2022

Resolved via #617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants