How to delete a message from the JMS queue

avikodak picture avikodak · Mar 2, 2012 · Viewed 34.5k times · Source

Is there any API to delete a message from the JMS queue without using the monitoring admin tool.

Answer

Shashi picture Shashi · Mar 2, 2012

No direct API for deleting message. You can call queueReceiver.receive() method to remove a message from a queue. QueueBrowser will not remove messages from queue.