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

UUIDBroadcastCache buffer messages on timeout/severed connections #1674

Closed
digitaldan opened this issue Jul 22, 2014 · 5 comments
Closed

UUIDBroadcastCache buffer messages on timeout/severed connections #1674

digitaldan opened this issue Jul 22, 2014 · 5 comments

Comments

@digitaldan
Copy link

This is related to #1655

Following the same flow as in #1655, if a broadcast message is sent after a client has abruptly disconnected (ctrl-c or timeout for example) but before that client has reconnected, then the message is silently lost. The expected behavior would be that the broadcast cache would retain the message if the client is not connected. As a note, messages sent after the client has reconnected are delivered fine (per #1655), only messages sent while the client is disconnected are lost.

@digitaldan
Copy link
Author

One other note, I have tried running this with trace logging and do not see any exceptions in the log.

@jfarcand
Copy link
Member

Hi, I agree the could be an issue when a write operation happens but there is no I/O exception thrown by the underlying server, Atmosphere can't hadly do something for it except implementing a ACK protocol with the client (like AtmospherePro is offering). In that case messages would be resent in case the client never received it. But with the current default implementtation and since Jetty/Tomcat/Undertow fail to detect the closed connection, a little bit can be done (this is clearly an issue with the JDK IMO, e.g fail to detect the closed connection).

Can you elaborate about the timeout issue? That one is different and should be in another issue, if the time out happens server side.

@digitaldan
Copy link
Author

Thanks, I meant if the client times out, not the server. Yes, I would expect the server to through a IO exception when trying to write to a broken connection. From what I have read this is the only reliable way of detecting if a connection is truly disconnected in Java. I'm surprised Jetty is not throwing something.

@slovdahl slovdahl changed the title UUIDBroadcastCache loosing messages on timeout/severed connections UUIDBroadcastCache losing messages on timeout/severed connections Aug 21, 2014
@jfarcand jfarcand changed the title UUIDBroadcastCache losing messages on timeout/severed connections UUIDBroadcastCache buffer messages on timeout/severed connections Oct 15, 2014
@jfarcand
Copy link
Member

Changing the title as I don't think messages are lost...they will be cached once the connection throw an IOException

@jfarcand
Copy link
Member

jfarcand commented Jan 8, 2015

Closing as fixed.

@jfarcand jfarcand closed this as completed Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants