activemq.xml的配置说明
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.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 -->
file:${activemq.base}/conf/credentials.properties
<!-- The element is used to configure the ActiveMQ broker. -->
<!-- brokerName:必须定义一个名称 -->
<!-- 不使用持久化存储:persistent="false",注意:内存要足够大 -->
<!-- 如果设定了,则全局按照,这里精细控制每一个q -->
<!-- 设定了flowcontrol以后,会根据memorylimit的缓冲区设定的大小,决定producer的流速,即:可能拖慢producer -->
<!-- 设定flowcontrol false后(同时不设定systemUsage),虽然不会拖慢producer,但是可能会占用大量activemq的内存,如果处理仍然不及时,可能最终导致amq outofmemory -->
<!-- 参考下面的说明 -->
<!-- 设定了false以后,表示producer直接都给,直到撑死systemUsage,才报客户端Exception -->
<!-- 设定true,表示超过memoryLimit以后,就等,等到systemUsage设定的超时时间报Exception -->
<!-- 尽管可以让systemUsage统一管理全部的,但也就失去了精细管理每一个队列的能力,如果队列有重要和不重要之分,即:有的允许丢数据的,就设定true和memoryLimit;有的不允许的,就单独设定 -->
<!-- 关于amq的特殊检测参数也在这里设定,参见http://activemq.apache.org/advisory-message.html -->
<!-- queuePrefetch:一次分配给consumer多少数量的消息 -->
<!-- Use VM cursor for better latency
For more information, see:
http://activemq.apache.org/message-cursors.html
-->
<!-- 设定jmx管理端口 -->
<!-- 设定持久化方案 -->
<!-- 稳定性最强的一个 -->
<!-- -->
<!-- 对于恢复来说,这个存储不能保证完全不丢数据。它比一般存储的快50% -->
<!-- System Usage 对整个的broker做全局设定-->
<!-- 使用systemUsage,以后,如果参数值设定不当,可能导致整个的q停止相应 -->
<!-- 好的办法是:设定systemUsage,同时设定sendFailIfNoSpaceAfterTimeout(多长时间后超时),这个超时信息会返回给producer。这样即不会让amq被撑死,有能够保证producer不被拖死 -->
<!-- 定义连接方式,注意如果只监听内网ip,需要指定IP地址 -->
<!-- 可以指定热备等,使用failover -->
<!-- 对于broker,可以设定认证 -->
<!--
-->
<!-- 可以设定web 管理界面 -->
另外,满座网关于amq的培训ppt,有需要的可以拿去~~
从这里下载
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.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 -->
file:${activemq.base}/conf/credentials.properties
<!-- The element is used to configure the ActiveMQ broker. -->
<!-- brokerName:必须定义一个名称 -->
<!-- 不使用持久化存储:persistent="false",注意:内存要足够大 -->
<!-- 如果设定了,则全局按照,这里精细控制每一个q -->
<!-- 设定了flowcontrol以后,会根据memorylimit的缓冲区设定的大小,决定producer的流速,即:可能拖慢producer -->
<!-- 设定flowcontrol false后(同时不设定systemUsage),虽然不会拖慢producer,但是可能会占用大量activemq的内存,如果处理仍然不及时,可能最终导致amq outofmemory -->
<!-- 参考下面的说明 -->
<!-- 设定了false以后,表示producer直接都给,直到撑死systemUsage,才报客户端Exception -->
<!-- 设定true,表示超过memoryLimit以后,就等,等到systemUsage设定的超时时间报Exception -->
<!-- 尽管可以让systemUsage统一管理全部的,但也就失去了精细管理每一个队列的能力,如果队列有重要和不重要之分,即:有的允许丢数据的,就设定true和memoryLimit;有的不允许的,就单独设定 -->
<!-- 关于amq的特殊检测参数也在这里设定,参见http://activemq.apache.org/advisory-message.html -->
<!-- queuePrefetch:一次分配给consumer多少数量的消息 -->
<!-- Use VM cursor for better latency
For more information, see:
http://activemq.apache.org/message-cursors.html
-->
<!-- 设定jmx管理端口 -->
<!-- 设定持久化方案 -->
<!-- 稳定性最强的一个 -->
<!-- -->
<!-- 对于恢复来说,这个存储不能保证完全不丢数据。它比一般存储的快50% -->
<!-- System Usage 对整个的broker做全局设定-->
<!-- 使用systemUsage,以后,如果参数值设定不当,可能导致整个的q停止相应 -->
<!-- 好的办法是:设定systemUsage,同时设定sendFailIfNoSpaceAfterTimeout(多长时间后超时),这个超时信息会返回给producer。这样即不会让amq被撑死,有能够保证producer不被拖死 -->
<!-- 定义连接方式,注意如果只监听内网ip,需要指定IP地址 -->
<!-- 可以指定热备等,使用failover -->
<!-- 对于broker,可以设定认证 -->
<!--
-->
<!-- 可以设定web 管理界面 -->
另外,满座网关于amq的培训ppt,有需要的可以拿去~~
从这里下载
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/187084/viewspace-759696/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/187084/viewspace-759696/