-
Notifications
You must be signed in to change notification settings - Fork 136
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
The async for natsConnection_RequestString #449
Comments
Is this for the server or a specific client language? |
For the C language client. Thanks |
ok will move this over to there. |
The C client already provides a way to create an async subscription that times out. See natsConnection_SubscribeTimeout. So you could create a subscription on a wildcard subject, and publish your requests using natsConnection_PublishRequestString with a unique token at the end of the reply subject. Take note of the behavior of the async subscription timeout in the doc. That is, the callback will be invoked with a |
Feature Request
Currently, I see there have the natsConnection_RequestString with a given timeout in MS, can it has an async version? Likes
natsConnection_RequestString(&reply, nc, "foo", "help", callback, 1000);
Once received the reply in 1000 MS or its timeout, the callback will be triggered.
Use Case:
For some large amounts of the sync call will cause the thread blocked
Proposed Change:
Add a callback parameter to the natsConnection_RequestString.
Who Benefits From The Change(s)?
Alternative Approaches
The text was updated successfully, but these errors were encountered: