How to remove all threads in ActiveMQ?

I am using ActiveMQ with the C # client library. I created 10,000 topics with random names as part of a test to evaluate, and now I can not get rid of those. ActiveMQ stops with so many topics, so I need them outside the system. Here is what I have tried so far, and none of this worked. I am running ActiveMQ as a Windows service.

  • Delete all files and folders in ACTIVEMQ_HOME \ Data li>
  • Turn off all perseverance
  • Delete all files and folders in a folder with saving
  • Delete the entire ACTIVEMQ_HOME directory and reinstall it in another folder

I tracked the activity of the file and cannot find the file that is written when the topic is created or deleted.

I understand that the .NET client library covers functionality a bit, so I can't even get a list of all those programmatically.

+4
source share
3 answers

Go to your broker configuration file, open the file for editing in the broker element, add the following attribute:

deleteAllMessagesOnStartup="true" 

This will delete all previous topics and queues, and their pending messages will be deleted from your kaha store when you restart your broker.

Good luck

+16
source

This question may be old, but a quick and easy way to completely clear all data in ActiveMQ along with all the queues and topics is to go along the following path:

 <ActiveMQ_Installation_Directory>/data 

And delete all the files in it.

Now, as soon as you restart AMQ, it will start as a new, clean install.

0
source

If you upgrade activemq to 5.8.0, you can use the REST API to manage the broker. But in 5.7.0 or an earlier management interface, only JMX can be accessed in the java environment.

-1
source

All Articles