-
Notifications
You must be signed in to change notification settings - Fork 141
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
Idle Timeouts do not work #238
Comments
Upon further inspection idle timeouts do not appear to work for clients either. Sample code:
|
From the spec, regarding Idle Timeouts:
So there's a few things that should be implemented for the idle-timeout. The main ones: -Developer can configure AMQP idle-timeout for peer 1 (done) |
idle-timeout is set locally and communicated to the remote peer. The remote peer is expected to honor this timeout by sending anything before it expires. You do not see a timer being created on the listener because the client did not set idle-timeout. When it is set by the listener, the client should start the timer and sends heartbeats when it is idle. Right now only the last piece is missing. When the listener sets the timeout, it does not enforce it. Same for the client as amqp is more a peer-to-peer protocol. I will fix this missing part. |
hey @xinchen10, thanks for the quick response as always. if we use the above client and listener, with both parties setting idle timeouts, I don't see an idle timeout communicated or a heartbeat message triggered on either end. Are you seeing different behavior? |
Pull request #239 addresses communicating the idle-timeout in the open frame. This correctly triggers the heartbeat. Enforcing the timeout remains to be addressed |
Pull request #240 addresses enforcing the idle timeout |
Fixed in commit f6a6e70 |
Currently AMQP Idle-Timeouts do not work for Listener connections. Sample code:
Despite setting the AMQP.IdleTimeout parameter to 5000, when a listener connection is opened in Connection.OnOpen, the "open.IdleTimeout" parameter which is used to set up the heartbeat timer is always the maximum uint value. Setting the idle timeout parameter thus does not cause listener connections to close if the connection is idle for the specified time.
The text was updated successfully, but these errors were encountered: