Is there a way to delete / purge all queues in ActiveMQ via the command line (win/linux)? I could only find the commands for a specific queue. Or maybe there's a way to do this via the activeMQ admin? Again, I only found how to delete/purge the queues one by one, which can be very tedious.
Thanks!
The ActiveMQ or activemq-admin script in ActiveMQ provides the functionality to purge messages from the ActiveMQ queue. The script is located under $DX_HOME/message-broker/bin directory. Purge is the option which is to be used to delete the messages from the destination queue.
In the JMS Modules table, click the name of JMS module that contains the queue you want to delete. In the module's Summary of Resources table, select the check box next to the queue that you want to delete. Click Delete and confirm the deletion.
You can do tweak your activemq.xml
a bit:
<broker deleteAllMessagesOnStartup="true" ...>
This works with KahaDB message stores (it has problems with JDBC message stores), all your messages get deleted and subsequently queues are cleared.
As you want all queues to be deleted, restarting the broker won't be a costly option to clean everything up.
The purge will happen on 'every' restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With