如何删除ActiveMQ中的所有主题?

发布于 2024-07-14 08:11:37 字数 423 浏览 4 评论 0原文

我将 ActiveMQ 与 C# 客户端库一起使用。 我创建了 10,000 个具有随机名称的主题作为评估目的测试的一部分,但现在我无法摆脱这些主题。 ActiveMQ 因如此数量的主题而陷入停顿,因此我需要将它们从系统中删除。 这是我到目前为止所尝试过的,但没有一个奏效。 我正在将 ActiveMQ 作为 Windows 服务运行。

  • 删除 ACTIVEMQ_HOME\Data 中的所有文件和文件夹
  • 关闭所有持久性
  • 删除持久性文件夹中的所有文件和文件夹
  • 删除整个 ACTIVEMQ_HOME 目录并将其重新安装到其他文件夹中

我已跟踪文件活动,但找不到任何文件创建或删除主题时写入的内容。

我意识到 .NET 客户端库的功能有点少,所以我什至无法以编程方式获取所有主题的列表。

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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苏佲洛 2024-07-21 08:11:37

转到您的代理配置文件,打开该文件以在代理元素上进行编辑,添加以下属性:

deleteAllMessagesOnStartup="true"

这将导致所有先前的主题 & 当您重新启动代理时,队列及其待处理消息将从 kaha 存储中删除。

玩得开心!

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!

扎心 2024-07-21 08:11:37

这个问题可能很老了,但是完全清除 ActiveMQ 中的所有数据以及所有队列和主题的一种快速简单的方法是转到以下路径:

<ActiveMQ_Installation_Directory>/data

并删除其中的所有文件。

现在,一旦您重新启动 AMQ,它将以全新、干净的安装方式启动。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文