[ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38428 ]
Tom Vijlbrief commented on AMQ-724: ----------------------------------- I'm confused. When I try the netcat example with NoDisconnect in the current SVN version everything is rock solid. When I interrupt a C++ OpenWire client than I get non closed connections. I found a possible cure for the last problem. The InactivityMonitor code reads: public void onException(IOException error) { if( monitorStarted.get() ) { stopMonitorThreads(); getTransportListener().onException(error); } } So if monitorStarted is false the EOFException is completely ignored! I assume it should be: public void onException(IOException error) { if( monitorStarted.get() ) { stopMonitorThreads(); } getTransportListener().onException(error); // tom.vijlbrief } Attached a patch. With this patch the OpenWire sessions are closed. > Stomp client is not removed from the broker on client disconnect > ---------------------------------------------------------------- > > Key: AMQ-724 > URL: https://issues.apache.org/activemq/browse/AMQ-724 > Project: ActiveMQ > Issue Type: Bug > Components: Transport > Affects Versions: 4.0 > Environment: Linux, Java 1.5.0_06 > Reporter: Danielius Jurna > Assigned To: james strachan > Fix For: 4.0.2, 4.1.0 > > Attachments: dumpemu4.png, patch.txt, SessionState.patch, > StompScriptComplete.txt, StompScriptNoDisconnect.txt, > StompSubscriptionRemoveTest.java > > > If Stomp client crashes (or disconnects unexpectedly) when there are > unconsumed messages in the broker, the subscriptions are not removed from the > broker and some phantom consumer is still consuming messages. If you connect > other client, it receives only half messages (other half messages goes to > that phantom consumer still left afrter client disconnect). There are no > error logs in activemq logs. We are using stomp client, whith client > acknowledge mode, so on broker restart, all messages are delivered properly. > You can also see in jmx console, that subscription still exists whithout any > connection left. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.