【入门】Apache ActiveMQ 5.4.1 的上载安装

【入门】Apache ActiveMQ 5.4.1 的下载安装

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”

【入门】Apache ActiveMQ 5.4.1 的上载安装

相关文章:

你感兴趣的文章:

标签云: