[ https://issues.apache.org/activemq/browse/AMQ-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38032 ]
Danielius Jurna commented on AMQ-724: ------------------------------------- There is a clear bug in SessionState class. EIther you have to fix this bug, o remove SessionState functionality, if it's not used. When broker shuts down session, it sets shutdown flag on session state. But currently in the code instead of true it sets false (which means that session is not shut down). The bug is not releted with connections which are not removed. The problem occures when connection is removed, but subscription is not. It's not easy to reproduce this bug. You have to kill stomp connection during message prefetch (within a second after connection is established and subscribtion is made). > 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, > 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.