A simple way to do this is to use a QueueBrowser to check the queue, after you know the correct one you are able to consume it with a message selector for exact this message (e.g. the message id) or the client know the necessary message properties.
Thanks for your answer Wolf. I'm trying that way but it has no messages in queue. I think it was already buffered, maybe I have to set consumer-window-size to zero, but i dunno where i set this parameter. What do you think?
Just to complement, i tried to "Remove All Messages" by Admin-Console and JBoss failed to do that. It returns me:
"removeAllMessages java.lang.IllegalStateException: Cannot remove references while deliveries are in progress (Channel 1), there are 5"
I never tried AdminConsole for this.
The application read via QueueBrowser it's own messages display it and the user is able to drop unprocessed messeges.
This is done by a normal consuming with a special message selector.
You never see messages which are in progress by the 'normal' processing
I've found an answer for my question.
It is not possible to handle a message who's being delivered. I've tried to set the consumer window to zero, and a lot of other things. I've been studing a solution for case about a week, googling all possibilities but it cannot be done. Actually I've found the class who operate this channel between producer and consumer, but there a lot of comments sugesting to not alter the code to ensure integrity.