方法一

通过 ActiveMQ Web 控制台删除。

方法二

通过 Java 代码删除。

ActiveMQConnection.destroyDestination(ActiveMQDestination destination)

方法三

通过配置 conf/activemq.xml, 当 broker 探测到闲置的队列或主题,删除、回收资源。

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"
schedulePeriodForDestinationPurge="3600000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">">
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry queue=">" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000"/>
</policyEntries>
</policyMap>
</destinationPolicy>
</broker>

schedulePeriodForDestinationPurge = 3600000,表示每一小时检查一次,默认为 0,此功能关闭
gcInactiveDestinations,true 表示删除回收闲置的队列,默认为 false
inactiveTimoutBeforeGC = 600000,表示当队列或主题闲置 10 分钟后被删除,默认为 60 秒。

ActiveMQ(5.10.0) - 删除闲置的队列或主题的更多相关文章

  1. ActiveMQ 5.10.0 安装与配置

    先在官网下载activeMQ,我这里是5.10.0. 然后在解压在一个文件夹下即可. 我这里是:D:\apache-activemq-5.10.0-bin 然后进入bin目录:D:\apache-ac ...

  2. ActiveMQ(5.10.0) - Configuring the JAAS Authentication Plug-in

    JAAS provides pluggable authentication, which means ActiveMQ will use the same authentication API re ...

  3. ActiveMQ(5.10.0) - Spring Support

    Maven Dependency: <dependencies> <dependency> <groupId>org.apache.activemq</gro ...

  4. ActiveMQ(5.10.0) - Connection Configuration URI

    An Apache ActiveMQ connection can be configured by explicitly setting properties on the ActiveMQConn ...

  5. ActiveMQ(5.10.0) - Building a custom security plug-in

    If none of any built-in security mechanisms works for you, you can always build your own. Though the ...

  6. ActiveMQ(5.10.0) - hello world

    Sending a JMS message public class MyMessageProducer { ... // 创建连接工厂实例 ConnectionFactory connFactory ...

  7. ActiveMQ(5.10.0) - 使用 JDBC 持久化消息

    1. 编辑 ACTIVEMQ_HOME/conf/activemq.xml. <beans> <broker brokerName="localhost" per ...

  8. ActiveMQ(5.10.0) - Configuring the Simple Authentication Plug-in

    The easiest way to secure the broker is through the use of authentication credentials placed directl ...

  9. ActiveMQ(5.10.0) - Destination-level authorization

    To build upon authentication, consider a use case requiring more fine-grained control over clients t ...

随机推荐

  1. Castle IOC容器实践之FactorySupport Facility

    PDF版本下载:http://file.ddvip.com/2008_10/1223538519_ddvip_4853.rar示例代码下载:http://file.ddvip.com/2008_10/ ...

  2. java中关于类的封装与继承,this、super关键字的使用

    原创作品,可以转载,但是请标注出处地址http://www.cnblogs.com/V1haoge/p/5454849.html. this关键字: this代表当前对象,它有以下几种用途: 1.本类 ...

  3. sql prompt格式设置

    sql prompt格式设置. 格式前: 格式后:

  4. CentOS 6.5安装MySQL中文乱码问题解决

    不管是Linux还是Windows都有新手遇到MySQL服务安装好了之后写入中文发现乱码,今天我装了个CentOS 6.5也遇到了这个问题,现在解决了,分享一下经验. 1.首先安装mysql,我很怕麻 ...

  5. BW知识点总结及面试要点

    1.       如何理解数据仓库? 数据仓库 是 一个面向主题的,集成的,相对稳定的,反应历史变化的数据集合,用于支持管理决策. 2.       OLAP 和 OLTP的基本概念 和 区别? Ol ...

  6. 用c#读取并分析sql2005日志

    用过logExplorer的朋友都会被他强悍的功能吸引,我写过一篇详细的操作文档可以参考http://blog.csdn.net/jinjazz/archive/2008/05/19/2459692. ...

  7. TreeView节点拖拉操作1

      TreeView节点拖拉操作1 //事先设置 TreeView1.DragMode= dmAutomatic;   unit Unit1; interface uses   Windows, Me ...

  8. android 退出整个程序

    上网学了好多方法,关于Android的Activity如何退出.好多方法都不行啦,试了各种方法,下面这种方法就是我最喜欢的,简单又容易懂. 使用单例模式创建一个Activity管理对象,该对象中有一个 ...

  9. php实现网页标签补全方法(转)

    导读:PHP在生成静态文件的时候,有时候会因为一些混编问题让HTML标签不完整或混乱而导致页面混乱.作者分享下面这段小代码可以非常方便解决问题. 如果你的网页内容的html标签显示不全,有些表格标签不 ...

  10. RTB广告展示分步说明

    原文:http://contest.ipinyou.com/cn/manual.shtml RTB (Real Time Bidding, 实时竞价) 是近年来计算广告领域最激动人心的进展之一. 它增 ...