I'm using ActiveMQ with the C# client library. I created 10,000 topics with random names as part of a test for evaluation purposes and now I can't get rid of the topics. ActiveMQ grinds to a halt with this number of topics so I need them out of the system. Here is what I have tried so far, and none of it has worked. I'm running ActiveMQ as a Windows service.
I've traced the file activity and cannot find any file that is written to when a topic is created or deleted.
I realize that the .NET client library is a little light on functionality, so I can't even get a list of all the topics programmatically.
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.
What Is an ActiveMQ Topic? ActiveMQ topic is a pipeline of messages where a message comes in and goes to every subscriber.
Go to your broker configuration file, open the file for editing on the broker element, add the following attribute:
deleteAllMessagesOnStartup="true"
This will cause all previous topics & queues, and their pending messages to be deleted from your kaha store when you restart your broker.
Have Fun!
This question might be old, but a quick and easy way to totally purge all data in ActiveMQ alongwith all queues and topics is to go to the following path:
<ActiveMQ_Installation_Directory>/data
And delete all files in that.
Now once you restart AMQ it will start as a fresh, clean install.
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