用户工具

站点工具


分享:技术:jms:activemq的安装

ActiveMQ的安装

cd /home/soft #进入目录
wget http://apache.fayea.com/activemq/5.12.0/apache-activemq-5.12.0-bin.tar.gz #下载activemq 5.12.0
tar zxvf apache-activemq-5.12.0-bin.tar.gz #解压文件
cd /home/soft/apache-activemq-5.12.0/bin/linux-x86-64 #进入目录
./activemq start #以daemon方式启动activemq
./activemq stop #关闭activemq

访问http://121.43.104.34:8161/admin/,用户名:admin,密码:admin,验证启动成功。

spring整合activemq之后,启动应用,在activemq控台上会看到自动多了queue和topic,也可以看到连接的机器IP地址。

控台截图如下:

http://121.43.104.34:8161/admin/send.jsp 可以指定目的地,指定发送内容和发送次数。

spring整合activemq之后的应用可以监听到消息,打出日志

2015-09-24 16:57:15,980 [jmsContainer-1] INFO  [com.gxx.record.jms.ConsumerMessageListener:40] - 消息监听器接收内容:test send message
2015-09-24 16:57:15,981 [jmsContainer-1] INFO  [com.gxx.record.jms.ConsumerMessageListener:40] - 消息监听器接收内容:test send message
2015-09-24 16:57:15,982 [jmsContainer-1] INFO  [com.gxx.record.jms.ConsumerMessageListener:40] - 消息监听器接收内容:test send message
分享/技术/jms/activemq的安装.txt · 最后更改: 2015/09/24 17:07 由 gxx