配置文件如下
xmlns="/schema/beans"
xmlns:amq="/schema/core"
xmlns:xsi="/2001/XMLSchema-instance"
xsi:schemaLocation="/schema/beans /schema/beans/spring-beans-2.0.xsd
/schema/core /schema/core/activemq-core.xsd
/camel/schema/spring /camel/schema/spring/camel-spring.xsd">
file:///${activemq.base}/conf/credentials.properties
discoveryUri="multicast://default"/>
org.foo.bar
已主从模式运行(192.168.2.137为主,192.168.2.136为从),还需在客户端上运行如下命令:
java.naming.provider.url=failover:(tcp://192.168.2.137:61616,tcp://192.168.2.136:61616)?
randomize=false #没有这一行的话,就变成了networks of brokers
initialReconnectDelay=10 #这里的单位是毫秒
activemq的目录里有个example,只要简单配置一下build.xml,即可测试activemq的message的consume和query