This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I am using jboss AS 5.0, and need to delete a message from queue.
I am using spring as well in the application, with a task scheduler which hits a method which basically gets messages in the queue.
What I want is, after I am done with processing messages in the queue (messages returned by QueueBrowser enumeration), I want them to be deleted from the queue.
I think the JMS spec does not provide this facility, but just want to know if JBOSS Messaging provides this facility ?
Here is the code
This method is called by the scheduler each 15 minutes to see if there are messages available in the queue. If there are some, it does something with them and would try to have them removed, so that the next call to this method will not show the same message which has already been processed earlier.
One more thing, if I manually acknowledge the message, I get an IllegalStateException.