I have finally beeing able to find a testcase which is 100% reproduceable. I opened a Bug for this:
However, reading the source code, I am quite sure there are more possible places where the "receiver" can get lost. After all the event of a new message travels across a few Executor Pools and has quite some database interaction.
You opened the JIRA as JbossMessaging, while this is JBossMQ.
I have changed the JIRA. And assigned to Adrian.
But knowing Adrian Brock, you are likely to be Brocked :-)
One of the reasons I think this would be rejected, is you didn't state if you tried on latest versions.
Why don't you try a newer version? Maybe JBossMessaging on JBoss5?
What about JBAS 4.2+?
Support patches on older versions is something we offer through the EAP.
Adrian provided us with a Fix for 4.2.3 and this also applies to 4.0.5. Our first tests shows, that the specific condition is solved (in both versions). We now let this run on customer system and see if the problem is completely fixed, or if the messages get stuck at other conditions as well.
In parallel we are testing JBM with the same fault injection method in order to determine if it is really more reliable. We plan to switch to JBM only with 5.0 (and that will take us a few more month to finish the migration and tests).
I will keep you updated, Clebert in case we see something similiar with JBM.
Thanks to the JBoss Developers who made that fix possible so quickly (once we found the reason).