for hours I'm now trying to find a way to delete messages or a particular message (probably based on JMSMessageID ) from a JMS queue. I'm looking for someting like "removeAllMessages(QueueName)" and "removeMessage(QueueName, JMSMessageID)" which was (obviously) available through the jmx console(in case of stanadalone hornetq). But since there is no jmx console in AS7 any longer, all the information one can find in the internet is useless. I did already take a look in the management console up and down . It worked by using Management API but for that I have to write new Class altogether to delete messages which sends management operations to "hornetQ management queue" which I dont want . I have seen how to add/delete queue through CLI but I didnt see how To delete message in the queue using CLI . So how do I achieve it with or without using CLI ?
Using the CLI, there is a remove-message operation to remove a message from a jms-queue: