Can you verify if the behaviour occurs in TRUNK?
This looks like a dupe of http://www.jboss.org/index.html?module=bb&op=viewtopic&t=110195
which was fixed in TRUNK http://jira.jboss.com/jira/browse/JBMESSAGING-982
It still occurs with revision 2769, which was the most current one on TRUNK on this Monday and was checked in after JBMESSAGING-982 was closed.
In addition there are several differences to the behaviour reported in conjunction with JBMESSAGING-982:
1. It happens not only under heavy load as a race condition, but always.
2. The non-shrinking of the depth counter can be observed immediately and before closing the consumer.
As far as I can tell, it is not related and not resolved with the previous issue.
Ok, can you please add a JIRA task (against 1.4.0.CR1) with directions how to replicate.
Ok, I have replicated and am investigating