tags:

views:

773

answers:

3

I'm using ActiveMQ with the C# client library. I create 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.

  • Delete all of the files and folders in ACTIVEMQ_HOME\Data
  • Turn off all persistence
  • Delete all of the files and folders in the persistence folder
  • Delete the entire ACTIVEMQ_HOME directory and reinstall it in a different folder

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 can't even get a list of all the topics programmatically.

A: 

Little bit of Google ...

http://tr.im/gWa5

Hope it helps (I don't really know ActiveMQ)...

Martin Janiczek
I'm using the C# library, not the Java library, and that method doesn't help if I don't have the topic names, which were randomly generated.
Stefan Moser
A: 

I ended up scripting the deletes via the web admin interface. Programmatically load up the page that lists all of the topics and then parse the page for the delete links and send a request for each of those. Fun times!

Stefan Moser
+2  A: 

Hello,

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!

NSA
This just saved my bacon. Upvoted.
alxp