ActiveMQ的spring配置文件
从官网copy出来,做了部分修改:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- Allows us to use system properties as variables in this configuration file -->
<!-- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean> -->
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="zhang" dataDirectory=".">
<!--
For better performances use VM cursor and small memory limit.
For more information, see: http://activemq.apache.org/message-cursors.html Also, if your producer is "hanging", it's probably due to producer flow control.
For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="true">
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see: http://activemq.apache.org/slow-consumer-handling.html -->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
<!-- Use VM cursor for better latency
For more information, see: http://activemq.apache.org/message-cursors.html <pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
-->
<deadLetterStrategy>
<individualDeadLetterStrategy queuePrefix="TEST"/>
</deadLetterStrategy>
<pendingQueuePolicy>
<storeCursor/>
</pendingQueuePolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see: http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see: http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="kahadb"/>
</persistenceAdapter>
<!--
The systemUsage controls the maximum amount of space the broker will
use before slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html
If using ActiveMQ embedded - the following limits could safely be used: <systemUsage>
<systemUsage>
<memoryUsage> <memoryUsage limit="20 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="1 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="100 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
-->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="1 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="32 mb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="32 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire"
uri="tcp://0.0.0.0:61616?maximumConnections=1000"/>
<transportConnector name="amqp"
uri="amqp://0.0.0.0:5672?maximumConnections=1000"/>
</transportConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook"/>
</shutdownHooks>
</broker>
<!--
Enable web consoles, REST and Ajax APIs and demos Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->
<!-- <import resource="jetty.xml"/> -->
</beans>
关于通配符的说明(http://activemq.apache.org/wildcards.html):
. is used to separate names in a path
* is used to match any name in a path
> is used to recursively match any destination starting from this name
ActiveMQ的spring配置文件的更多相关文章
- ActiveMQ集成Spring使用
现在任何一个框架的使用都会结合spring框架,quartz.cxf与平时常见的Hibernate.mybatis.Struts等都可以与spring集成起来使用,在这里研究了activemq结合sp ...
- ActiveMQ 与 Spring
1. ActiveMQ安装 1.1 下载(版本5.14.5) 点我官网下载 1.2 安装 解压下载的压缩文件到任意目录中(eg. C:\Program Files (x86)\apache-activ ...
- ActiveMQ整合spring结合项目开发流程(生产者和消费者)总结
一:生产者代码编写: 1.配置pom.xml引入相关坐标 <dependencies> <!-- spring开发测试 --> <dependency> <g ...
- 消息中间件ActiveMQ及Spring整合JMS
一 .消息中间件的基本介绍 1.1 消息中间件 1.1.1 什么是消息中间件 消息中间件利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集成.通过提供消息传递和消息排 ...
- 淘淘商城项目_同步索引库问题分析 + ActiveMQ介绍/安装/使用 + ActiveMQ整合spring + 使用ActiveMQ实现添加商品后同步索引库_匠心笔记
文章目录 1.同步索引库问题分析 2.ActiveM的介绍 2.1.什么是ActiveMQ 2.2.ActiveMQ的消息形式 3.ActiveMQ的安装 3.1.安装环境 3.2.安装步骤 4.Ac ...
- ActiveMQ学习笔记(6)----ActiveMQ整合Spring开发
1. 添加依赖 spring 提供了对JMS的支持,需要添加Spring支持jms的包和Spring的核心包,如下: <dependency> <groupId>org.apa ...
- e3mall商城的归纳总结9之activemq整合spring、redis的缓存
敬给读者 本节主要给大家说一下activemq整合spring,该如何进行配置,上一节我们说了activemq的搭建和测试(单独测试),想看的可以点击时空隧道前去查看.讲完了之后我们还说一说在项目中使 ...
- 你不知道的Spring配置文件
Spring配置文件是用于指导Spring工厂进行Bean生产.依赖关系注入(装配)及Bean实例分发的"图纸".Java EE程序员必须学会并灵活应用这份"图纸&quo ...
- Spring配置文件详解
转自: http://book.51cto.com/art/201004/193743.htm 此处详细的为我们讲解了spring2.5的实现原理,感觉非常有用 spring配置文件是用于指导Sp ...
随机推荐
- java根据URL获取HTML内容
之前我写脚本,是想获取HTML内容的. 但是呢...一方面编码困扰着我,于是我写了这个: java根据URL获取网页编码 然后呢,每个网站是不是GZIP还得判断,贼麻烦... 但是没办法啊,麻烦也得写 ...
- python3.5学习第二章(1)标准库,bytes
一.输出python库的路径: 1.sys标准库 import sysprint(sys.path) 结果: 'E:\\python练习\\python35学习\\Day2', 'E:\\python ...
- leecode第八十九题(格雷编码)
class Solution { public: vector<int> grayCode(int n) { vector<int> res; res.push_back(); ...
- x1c 2018 静音调教
折腾快1周,在去intel官网手动下载最新显卡驱动,手动卸载老驱动,断网,重启,手动安装之后(还要再禁用点和散热相关的设备).终于不卡了.开始工作,但又遇到一个问题:太TM吵了! 经过调教,基本保障看 ...
- 从flask视角理解angular(四)Route
app-routing.modules.ts import { NgModule } from '@angular/core'; import { RouterModule, Routes } fro ...
- JavaScript中的prototype和__proto__细致解析
最近在学js,体会了一点点它的灵活性.对于初学者的我,总是被它的灵活感到晕头转向,最近发现了一点东西想与大家分享. JavaScript中的prototype和_proto_: 我们先了解一点js中的 ...
- [C#]获取指定文件夹下的所有文件名(递归)
典型的递归方法: //定义一个list集合 List<String> list = new List<String>(); public void director(strin ...
- 第 3 章 镜像 - 017 - RUN vs CMD vs ENTRYPOINT
RUN.CMD 和 ENTRYPOINT 这三个 Dockerfile 指令看上去很类似,很容易混淆. 简单的说: RUN 执行命令并创建新的镜像层,RUN 经常用于安装软件包. CMD 设置容器启动 ...
- linux 下设置定时任务
Linux Crontab 定时任务 命令详解 在工作中需要数据库在每天零点自动备份所以需要建立一个定时任务.我选择在Linux下使用Crontab来添加定时任务执行shell文件.shell文件有数 ...
- 20165303 魏煜第四次实验 Android开发
实验内容 1实验要求: 参考<Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)>第二十四章: 参考http://www.cnblog ...