I still have this issue? Any idea?
Currently the productive system is not working correct anymore.
So the pressure to solve it is big.
A desperate programmer
Those "stuck" messages, are messages that have been sent or consumed as part of an XA transaction, and the server failed (crashed?) before the XA transaction committed or rolled back.
If you're familiar with XA/JTA, you'll know they're in a "prepared" state (I suggest googling on XA if you're not up to speed).
So, *something* needs to decide to commit them or roll them back. That something is normally the recovery manager - this is a component of JBoss AS (see JBoss TS), not JBM, that decides this.
There is a section in the use guide for how to configure XA recovery. Most probably you haven't set this up, so messages will stay "stuck" until you do.