- 浏览: 1041133 次
- 性别:
- 来自: 长沙
文章分类
- 全部博客 (639)
- 服务器配置篇 (58)
- hibernate篇 (14)
- spring篇 (33)
- struts篇 (28)
- JS篇 (46)
- 其他技术篇 (46)
- 数据库集群配置 (6)
- JAVA基础相关 (48)
- 分布式框架HadHoop的应用 (2)
- FLEX篇 (8)
- SQLSERVER技术 (32)
- Android学习 (13)
- amchart学习笔记 (1)
- openfire+smark搭建即时通讯 (9)
- Linux学习 (18)
- Oracle数据库 (15)
- 网站优化技术 (12)
- mysql数据库 (2)
- 项目学习总结 (18)
- 工具类(JAVA) (12)
- 工具类(JS) (2)
- 设计模式 (10)
- Lucene学习 (24)
- EJB3学习 (6)
- Sphinx搜索引擎 (3)
- 工作中用到的软件小工具 (5)
- .NET (49)
- JAVA 连接SQLSERVER2008步骤 (1)
- MongoDB (19)
- Android手机开发 (3)
- Maven (6)
- vue (9)
- Shiro (4)
- mybatis (3)
- netty框架 (1)
- SpringCloud (3)
- spring-cloud (7)
- Git (1)
- dubbo (2)
- springboot (13)
- rocketmq (1)
- git学习 (2)
- kafka服务器 (2)
- linux (10)
- WEB系统辅助项目 (1)
- jenkins (2)
- docker (4)
- influxdb (3)
- python (2)
- nginx (1)
最新评论
-
jiangfuofu555:
这样数据量大,效率怎么样?
sqlserver 实现分页的前台代码 以及后台的sqlserver语句 -
w156445045:
博主请问下,如何做到实时的刷新呢,
另外我后台是Java 谢谢 ...
web 版本的汽车仪表盘,非常好看。还有各种图形 -
jackyin5918:
<transportConnector name=&qu ...
ActiveMQ的activemq.xml详细配置讲解 -
握着橄榄枝的人:
你这个不是spring1.x的吧
spring1.x使用AOP实例 -
xiaophai:
全乱套了!
openfire+spark搭建完美的及时通讯
- <beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:amq="http://activemq.org/config/1.0"
- 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.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd
- http://activemq.apache.org/camel/schema/spring>
- <!-- persistent="true"表示要持久化存储消息,和子元素persistenceAdapter结合使用 -->
- <!-- dataDirectory默认的存储持久化数据的目录 -->
- <!-- brokerName 设置broker的name,在注意在网络上必须是唯一的-->
- <!-- 更多参考http://activemq.apache.org/xbean-xml-reference-50.html#XBeanXMLReference5.0-brokerelement -->
- <broker xmlns="http://activemq.org/config/1.0" brokerName="192.168.1.148" persistent ="true" dataDirectory="${activemq.base}/data" useShutdownHook="false">
- <!-- Destination specific policies using destination names or wildcards -->
- <!-- wildcards意义见http://activemq.apache.org/wildcards.html -->
- <destinationPolicy>
- <policyMap>
- <policyEntries>
- <!-- 这里使用了wildcards,表示所有以EUCITA开头的topic -->
- <policyEntry topic="EUCITA.>" producerFlowControl="false" memoryLimit="10mb">
- <!-- 分发策略 -->
- <dispatchPolicy>
- <!-- 按顺序分发 -->
- <strictOrderDispatchPolicy/>
- </dispatchPolicy>
- <!-- 恢复策略-->
- <subscriptionRecoveryPolicy>
- <!-- 只恢复最后一个message -->
- <lastImageSubscriptionRecoveryPolicy/>
- </subscriptionRecoveryPolicy>
- </policyEntry>
- </policyEntries>
- </policyMap>
- </destinationPolicy>
- <!-- The transport connectors ActiveMQ will listen to -->
- <transportConnectors>
- <transportConnector name="openwire" uri="tcp://192.168.1.148:61616" discoveryUri="multicast://default"/>
- <transportConnector name="ssl" uri="ssl://192.168.1.148:61617"/>
- <transportConnector name="stomp" uri="stomp://192.168.1.148:61613"/>
- <transportConnector name="xmpp" uri="xmpp://192.168.1.148:61222"/>
- </transportConnectors>
- <!-- 消息持久化方式 -->
- <persistenceAdapter>
- <amqPersistenceAdapter directory="${activemq.base}/data"/>
- </persistenceAdapter>
- </broker>
- <!-- lets create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic -->
- <commandAgent xmlns="http://activemq.org/config/1.0"/>
- <!-- An embedded servlet engine for serving up the Admin console -->
- <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
- <connectors>
- <nioConnector port="8161" />
- </connectors>
- <handlers>
- <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
- <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
- </handlers>
- </jetty>
- </beans>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.org/config/1.0" 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.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd http://activemq.apache.org/camel/schema/spring> <!-- persistent="true"表示要持久化存储消息,和子元素persistenceAdapter结合使用 --> <!-- dataDirectory默认的存储持久化数据的目录 --> <!-- brokerName 设置broker的name,在注意在网络上必须是唯一的--> <!-- 更多参考http://activemq.apache.org/xbean-xml-reference-50.html#XBeanXMLReference5.0-brokerelement --> <broker xmlns="http://activemq.org/config/1.0" brokerName="192.168.1.148" persistent ="true" dataDirectory="${activemq.base}/data" useShutdownHook="false"> <!-- Destination specific policies using destination names or wildcards --> <!-- wildcards意义见http://activemq.apache.org/wildcards.html --> <destinationPolicy> <policyMap> <policyEntries> <!-- 这里使用了wildcards,表示所有以EUCITA开头的topic --> <policyEntry topic="EUCITA.>" producerFlowControl="false" memoryLimit="10mb"> <!-- 分发策略 --> <dispatchPolicy> <!-- 按顺序分发 --> <strictOrderDispatchPolicy/> </dispatchPolicy> <!-- 恢复策略--> <subscriptionRecoveryPolicy> <!-- 只恢复最后一个message --> <lastImageSubscriptionRecoveryPolicy/> </subscriptionRecoveryPolicy> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <!-- The transport connectors ActiveMQ will listen to --> <transportConnectors> <transportConnector name="openwire" uri="tcp://192.168.1.148:61616" discoveryUri="multicast://default"/> <transportConnector name="ssl" uri="ssl://192.168.1.148:61617"/> <transportConnector name="stomp" uri="stomp://192.168.1.148:61613"/> <transportConnector name="xmpp" uri="xmpp://192.168.1.148:61222"/> </transportConnectors> <!-- 消息持久化方式 --> <persistenceAdapter> <amqPersistenceAdapter directory="${activemq.base}/data"/> </persistenceAdapter> </broker> <!-- lets create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic --> <commandAgent xmlns="http://activemq.org/config/1.0"/> <!-- An embedded servlet engine for serving up the Admin console --> <jetty xmlns="http://mortbay.com/schemas/jetty/1.0"> <connectors> <nioConnector port="8161" /> </connectors> <handlers> <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" /> <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" /> </handlers> </jetty> </beans>
注释
关于XML配置中元素的具体信息可以参考http://activemq.apache.org/xbean-xml-reference-50.html 下面介绍本篇配置使用的一些重要元素。
DispathPolicy
ActiveMQ支持3中不同的分发策略(避免翻译了以后误解,这里用原文):
- <roundRobinDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
- <simpleDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
- <strictOrderDispatchPolicy>:Dispatch policy that causes every subscription to see messages in the same order.
SubscriptionRecoveryPolicy
ActiveMQ支持6种恢复策略,可以自行选择使用不同的策略
- <fixedCountSubscriptionRecoveryPolicy>: keep a fixed count of last messages.
- <fixedSizedSubscriptionRecoveryPolicy>: keep a fixed amount of memory available in RAM for message history which is evicted in time order.
- <lastImageSubscriptionRecoveryPolicy>:only keep the last message.
- <noSubscriptionRecoveryPolicy>:disable recovery of messages.
- <queryBasedSubscriptionRecoveryPolicy>:perform a user specific query mechanism to load any messages they may have missed.
- <timedSubscriptionRecoveryPolicy>:keep a timed buffer of messages around in memory and use that to recover new subscriptions.
- active文档.rar (921.4 KB)
- 下载次数: 457
评论
3 楼
jackyin5918
2013-11-21
<transportConnector name="openwire" uri="tcp://192.168.1.148:61616"
这个连接配置里面的 ip地址什么作用呢?
为什么要配置这个ip地址,感觉使用本机的ip地址不就可以了么?
这个连接配置里面的 ip地址什么作用呢?
为什么要配置这个ip地址,感觉使用本机的ip地址不就可以了么?
2 楼
baobeituping
2011-05-02
Line 164 in XML document from class path resource [activemq.x
ml] is invalid;
在你的activemq.xml 的164行出错了。你看看是怎么写的
ml] is invalid;
在你的activemq.xml 的164行出错了。你看看是怎么写的
1 楼
tom&jerry
2011-04-06
大哥,出现下面的情况是怎么回事?谢谢!
ERROR: java.lang.Exception: org.springframework.beans.factory.xml.XmlBeanDefinit
ionStoreException: Line 164 in XML document from class path resource [activemq.x
ml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-t
ype.2.4.c: The matching wildcard is strict, but no declaration can be found for
element 'jetty'.
java.lang.Exception: org.springframework.beans.factory.xml.XmlBeanDefinitionStor
eException: Line 164 in XML document from class path resource [activemq.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4
.c: The matching wildcard is strict, but no declaration can be found for element
'jetty'.
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:99)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:143)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
ERROR: java.lang.Exception: org.springframework.beans.factory.xml.XmlBeanDefinit
ionStoreException: Line 164 in XML document from class path resource [activemq.x
ml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-t
ype.2.4.c: The matching wildcard is strict, but no declaration can be found for
element 'jetty'.
java.lang.Exception: org.springframework.beans.factory.xml.XmlBeanDefinitionStor
eException: Line 164 in XML document from class path resource [activemq.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4
.c: The matching wildcard is strict, but no declaration can be found for element
'jetty'.
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:99)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:143)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
发表评论
-
Windows下安装并设置Redis
2017-11-28 14:23 596版权声明:欢迎加入【开源技术交流群】: https:// ... -
由于安全狗导致网站访问出现302重定向问题
2015-08-06 18:14 1669网站开始的时候,碰到这种问题,开始没留意以为是浏览器导致的。后 ... -
windows下使用memcache并修改memcache最大使用内存
2015-02-27 22:42 746将memcache服务器安装包解压到C:\memcached ... -
nginx 日志文件切割
2014-12-13 08:23 781转载:http://www.cnblogs.com/beni ... -
nginx+tomcat7+memcached做集群以及session复制
2014-12-07 22:50 718首先:配置tomcat集群 nginx+ tomcat7 ... -
Memcached入门
2014-11-27 23:17 754Memcached是一个高性能的分布式内存对象缓存系统,用于 ... -
nginx + tomcat 配置,静态资源直接使用nginx
2014-11-26 22:34 932upstream tomcat_server { ... -
Nginx Location配置总结
2014-11-26 22:33 770语法规则: location [=|~|~*|^~] /ur ... -
Memche全站缓存
2014-11-13 17:23 886http://my249645546.iteye.com/bl ... -
煩惱的“java.lang.OutOfMemoryError:PermGen space"異常
2014-11-10 20:48 637最近在做一個jee的項目 ... -
nginx+tomcat实现负载均衡
2014-11-05 22:00 898作者:niumd Blog:http://ari.itey ... -
Tomcat 7优化前及优化后的性能对比
2014-11-05 09:52 1032Tomcat 7在我们日常开发、测试、生产环境都会使用到,但 ... -
resin 加花生壳搭建外网访问服务器
2012-10-08 20:44 1053花生壳发布WEB服务 -
resin 配置session过期
2012-03-23 10:29 1474Session的配置 <session ... -
nginx 解决session共享问题(jvm-route)方式
2012-02-28 13:45 2692前几天看到 http://code.google.com ... -
nginx.conf配置详细说明
2012-02-28 09:15 1273vim conf/nginx.conf#用户 用户组user ... -
nginx 解决session共享问题
2012-02-28 09:19 14141) 不使用session,换作cookie能把sessio ... -
java.lang.NoClassDefFoundError: com/caucho/make/PersistentDependency
2012-02-28 08:09 1726之前一直用resin-pro-3.0.22,这两天由于工作需要 ... -
玩玩负载均衡---在window与linux下配置nginx
2012-02-27 14:29 1378最近有些时间,开始接触负载均衡方面的东西,从硬件F5再到Cit ... -
squid 配置缓存服务器
2011-12-31 13:40 1556Squid for Windows 简介 是大家也许不知道, ...
相关推荐
activemq-5.15.15 JDBC持久化mysql8.0+的activemq.xml
apache-activemq-5.16.0.zip
apache-activemq-5.15.15二进制包,安装包,apache-activemq-5.15.15-bin.tar.gz
1.解压 tar -zxvf apache-activemq-5.15.12-bin.tar.gz 2.进入bin目录 ...cd /apache-activemq-5.15.12/bin ...3.运行,没有配置环境变量只能在bin目录下...5.activemq的后台默认端口是61616,前台访问端口是8161
Apache ActiveMQ是Apache软件基金会的一个开源项目,是一个基于消息的通信中间件。ActiveMQ是JMS的一个具体实现,支持JMS的两种消息模型。ActiveMQ使用AMQP协议集成多平台应用,使用STOMP协议通过websockets在Web...
apache-activemq-5.16.6-bin.zip
activemq-all.5.14jar包,亲测可用!!
apache-activemq,运行需要依赖的jdk版本为11+
apache-activemq-5.8.0.zip 能直接使用的官方原版 apache-activemq-5.8.0.zip 能直接使用的官方原版
apache-activemq-5.15.11-bin.rar是ActiveMQ,用于做消息队列,里面包含windows和linux两个版本。
ActiveMQ 5.15.11 Linux版,
apache-activemq-5.16.5,启动要求jdk版本8+
基于JMS消息中间件activemq5.13.5版本,apache-activemq-5.13.5-bin.zip
工具包~~~~·Java apache-activemq-5.12.0.zip的压缩包
logback-spring.xml文件配置,1、异步日志,2、滚动日志,存放固定时长的日志,超过时间的自动删除,3、单个文件超过指定大小,分成多个,防止单个文件过大,查看不方便
activemq, Apache ActiveMQ镜像 欢迎来到 Apache ActiveMQis是一个高性能的Apache 2.0许可以消息代理和 JMS 1.1实现。正在启动要帮助你入门,请尝试以下链接:入门http://activemq.apache.org/version-
官方版本,亲测可用
ActiveMQ是一种开源的基于JMS(Java Message Servie)规范的一种消息中间件的实现