Flush all messages in the queue

Posted on

Hi, I am trying to delete messages in the JMS queue.
The queue contains approximately 3.5 million records.When I click on the Flush button in the admin console , it ran for around three hours with almost 100% utilization of all CPUs and finally stopped responding. When I restarted Jboss, I found only 20000 messages were deleted in three hours.

Is there any preferred message for the flushing the entire queue ?