1. 下载 ActiveMQ 的最新版本,在本文编写的时候最新版本为 5.4.1
2. 将 Apache ActiveMQ 5.4.1 加压到自己的开发包目录。 我的目录是 F:\Apache\
3. 添加环境变量 ACTIVEMQ_HOME, 并使其指向 activemq的根目录:
4. 为了方便在控制台中运行activemq, 将 %ACTIVEMQ_HOME%/bin; 添加到path中
5. 开始 -> 运行 -> 输入activemq 运行activemq
6. 如果出错,请确保系统满足如下环境:
-- JDK: 1.5.x 或者更高, 在编写本文时,我用的是1.6.22
-- 系统环境变量中配置了 JAVA_HOME 变量, 并且指向了JDK的根目录
7. 在启动ActiveMQ是可能会碰到如下错误:
Console output:
[Starting ActiveMQ Broker] ERROR org.apache.activemq.broker.BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.EOFException: Chunk stream does not exist at page: 0
java.io.EOFException: Chunk stream does not exist at page: 0
at org.apache.kahadb.page.Transaction$2.readPage(Transaction.java:454)
at org.apache.kahadb.page.Transaction$2.<init>(Transaction.java:431)
at org.apache.kahadb.page.Transaction.openInputStream(Transaction.java:428)
at org.apache.kahadb.page.Transaction.load(Transaction.java:404)
at org.apache.kahadb.page.Transaction.load(Transaction.java:361)
at org.apache.activemq.broker.scheduler.JobSchedulerStore$3.execute(JobSchedulerStore.java:250)
at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
at org.apache.activemq.broker.scheduler.JobSchedulerStore.doStart(JobSchedulerStore.java:239)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.activemq.broker.scheduler.SchedulerBroker.getStore(SchedulerBroker.java:198)
at org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler(SchedulerBroker.java:185)
at org.apache.activemq.broker.scheduler.SchedulerBroker.start(SchedulerBroker.java:85)
at org.apache.activemq.broker.BrokerFilter.start(BrokerFilter.java:157)
at org.apache.activemq.broker.BrokerFilter.start(BrokerFilter.java:157)
at org.apache.activemq.broker.TransactionBroker.start(TransactionBroker.java:112)
at org.apache.activemq.broker.BrokerService$3.start(BrokerService.java:1786)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:496)
at org.apache.activemq.ra.ActiveMQResourceAdapter$1.run(ActiveMQResourceAdapter.java:85)
这个错误是由于 5.4.1 这个版本引入了 延迟发送的功能引起的, 具体原因没有找到,但是参考如下帖子:
https://issues.apache.org/jira/browse/AMQ-2935
修改 %ActiveMQ_HOME%/conf/activemq.xml 文件, 在<broker>中添加 schedulerSupport="false" 属性,禁掉scheduler功能即可.
<broker xmlns="http://activemq.apache.org/schema/core"
schedulerSupport="false"
brokerName="localhost"
dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true">
<!-- ...... -->
</broker>
8. 如果没有修改activemq的端口号,访问 http://localhost:8161/ 地址即可进入ActiveMQ的管理页面。
9. 如果上一面一步操作成功,则表示安装成功.
ActiveMQ默认的是OpenWire协议,并且访问链接是tcp:\\localhost:61616, 可以使用这个地址写一个简单示例来学习如何使用ActiveMQ
参考资料:
1. 官方的安装说明: http://activemq.apache.org/version-5-getting-started.html
2. 百度百科ActiveMQ词条: http://baike.baidu.com/view/433374.htm (强力推荐)
3. 禁止掉scheduler功能: https://issues.apache.org/jira/browse/AMQ-2935
- 大小: 53.9 KB
- 大小: 33.4 KB
分享到:
相关推荐
ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的...
Apache ActiveMQ5.8 入门最简单例子 消息队列 Master
apache-activemq Linux版本
apache-activemq-5.16.0.zip
Apache ActiveMQ JMS实现
activemq, Apache ActiveMQ镜像 欢迎来到 Apache ActiveMQis是一个高性能的Apache 2.0许可以消息代理和 JMS 1.1实现。正在启动要帮助你入门,请尝试以下链接:入门http://activemq.apache.org/version-
Instant Apache ActiveMQ Messaging Application Development How-to源码
Apache ActiveMQ是Apache软件基金会的一个开源项目,是一个基于消息的通信中间件。ActiveMQ是JMS的一个具体实现,支持JMS的两种消息模型。ActiveMQ使用AMQP协议集成多平台应用,使用STOMP协议通过websockets在Web...
apache-activemq-5.9.0-bin.zip
apache-activemq-5.11.2 附全解教程 apache-activemq-5.11.2 附全解教程
apache-activemq-5.15.15二进制包,安装包,apache-activemq-5.15.15-bin.tar.gz
apache activemq 5.7版本的方便大家下载,window系统的
apache-activemq-5.16.0
apache activemq 中间件
apache-activemq-5.8.0-bin.zip
解压缩apache-activemq-5.5.1-bin.zip,然后双击apache-activemq-5.5.1\bin\activemq.bat运行ActiveMQ程序。 包含了apache-activemq-5.5.1-bin.zip以及ActiveMQ一个helloworld的demo启动ActiveMQ以后,登陆:...
Apache ActiveMQ 教程 提供了相关的部署过程、开发方式等
Apache ActiveMQ 5.8 Maser 队列