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

Quickly return for no responders #136

Closed
autodidaddict opened this issue Oct 14, 2022 · 7 comments · Fixed by #137
Closed

Quickly return for no responders #136

autodidaddict opened this issue Oct 14, 2022 · 7 comments · Fixed by #137

Comments

@autodidaddict
Copy link
Collaborator

It looks like the only result code from making requests on a topic is :timeout. Does this apply to when there are no responders (which NATS immediately replies with)? If not, could we get some way to indicate the difference between when we waited the full timeout period versus when we waited no time due to lack of responders?

@mmmries
Copy link
Collaborator

mmmries commented Oct 14, 2022

@autodidaddict I didn't know about NATS providing a "no responders" message. Do you have a link to the documentation that shows this?

I would love to provide an immediate feedback that differentiates the two cases, but I think currently the code is just always waiting for the timeout and not paying attention to the message from NATS

@autodidaddict
Copy link
Collaborator Author

@autodidaddict
Copy link
Collaborator Author

autodidaddict commented Oct 14, 2022

Both the Rust and Go clients immediately short-circuit when there are no responders.

@autodidaddict
Copy link
Collaborator Author

@mmmries
Copy link
Collaborator

mmmries commented Oct 14, 2022

Perfect thanks for those links. I'll take a look and see if we can get the same thing implemented for our elixir client ❤️ 💛 💙 💚 💜

@autodidaddict
Copy link
Collaborator Author

I went looking for actual documentation and, unsurprisingly, I couldn't find this feature documented anywhere. Lately I just go to the source code because I have little confidence in the docs.

@mmmries
Copy link
Collaborator

mmmries commented Oct 16, 2022

Released in version 1.6.0 🎉 https://hex.pm/packages/gnat/1.6.0

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

Successfully merging a pull request may close this issue.

2 participants