[jboss-user] [JBoss Messaging] - Re: How do I empty a JBoss queue?

asaur do-not-reply at jboss.com
Mon Jul 28 13:42:01 EDT 2008


"ataylor" wrote : anonymous wrote : Sorry, I'll try to make it clearer. To sum it up, I can only see 2 ways to resolve my problem (a client disconnecting from the server while there were messages being delivered and coming back later using another connection): 
  | I'm still not sure what you're problem is? are you saying that messages that aren't consumed disappear from the queue? This shouldn't happen, any messages that haven't been acknowledged by the client will be placed back in the queue once the server is notified that the client has died. These will be available to the next client that connects.

Sorry, but I don't know when a message is "acknowledged" by the client. What I know is that, when the client disconnects, some messages are left in a "being delivered" state. They do not return to the queue (one way or another) for further consumption. This is what I can tell you about my problem (if it is not enough, please ask me whatever else you need to know):

1 - If I go to the database and query for all the messages in that particular queue, a number (non zero!) is returned.

2 - If I use the proper MBean to list the number of messages that same queue has (using the listAllMessages button), it returns blank (zero messages).

3 - If I use the same MBean to list the counter that queue has (using the listMessageCounterAsHTML button) the number under the 'Count' column is zero and the number of the queue 'Depth' is usually the same as the number of messages being delivered (sometimes it is bigger).

4 - If I try to delete all messages in that queue, the MBean invocation fails with the same exception (java.lang.IllegalStateException) mentioned previously.


Hope this helps to clarify the issue.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167140#4167140

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167140



More information about the jboss-user mailing list