本文介绍了ActiveMQ-通过命令行删除/清除所有队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过命令行(win/linux)删除/清除ActiveMQ中的所有队列?我只能找到特定队列的命令.也许有一种方法可以通过activeMQ管理员来做到这一点?再说一次,我只发现了如何一一删除/清除队列,这很繁琐.

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.

谢谢!

推荐答案

您可以对activemq.xml进行一些调整:

You can do tweak your activemq.xml a bit:

<broker deleteAllMessagesOnStartup="true"  ...>

这可用于KahaDB消息存储(JDBC消息存储存在问题),所有消息将被删除,随后队列将被清除.

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

这篇关于ActiveMQ-通过命令行删除/清除所有队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 15:38