-
Notifications
You must be signed in to change notification settings - Fork 57
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
Reconnection problems #586
Comments
thanks @uhfath how do you introduce the delay? |
@mtmk I've stumbled upon this during debugging and so even a simple |
OK got it thank you. You're hitting the consumer 'Inactive Threshold' (5 seconds) then consumer is deleted by the server. you should use ordered consumer instead. |
@mtmk thanks. |
that's true push consumer usage is discouraged at this time however this client implements ordered consumers using pull approach. unfortunately there is no good way of detecting a missing consumer in this case since server simply doesn't respond to the request if there is no consumer. you can try to recreate the consumer if you don't receive anything after a timeout, you can extend inactivity and make sure to delete the consumer yourself etc. we do try to take care of all these issues in our ordered consumer implementations. would be more than happy to see your feedback on it. |
@mtmk thank you for the help! |
Observed behavior
While trying to fetch some data using ephemeral consumer if there is a timeout the client tries to reconnect endlessly and doesn't succed.
Here is a sample init code:
And here is a log output when everything is fine:
And here is how a log looks like if there is a delay after "---=== STARTING ===---" before the fetch:
And if there is a delay right after the first fetch and output to log:
Expected behavior
The client should reconnect sucesfully if there is a timeout during any phase.
Server and client version
Server used:
docker image with tag 2.10
Client used:
NATS.net version 2.3.2
Host environment
Docker used under Windows 11 using WSL2.
Client used under Windows 11.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: