1:官方网站
下载最新版本,当前最新为5.9.0
2:解压后,打开cmd,进入bin目录,执行:activemq,即可启动。(linux下,输入nohup activemq &)
注意看打出的启动日志。
Loading message broker from: xbean:activemq.xml,这个文件是主要的配置文件。
Using Persistence Adapter: KahaDBPersistenceAdapter,这是一个activemq专用的消息存储器,速度很快的。
Listening for connections at: tcp://collonn-PC:61616 maximumConnections=1000&wireFormat.maxFrameSize=104857600,这是activemq监听的其中一个端口。
ActiveMQ WebConsole available at http://localhost:8161/,这是activemq基于页面的控制台。
3:打开
浏览器,输入http://localhost:8161/,选择Manage ActiveMQ broker using the old console,用旧的方式查看和控制activemq更方便。
二:快速进阶
1:进入到activemq_install_dir/config目录,有以下几个重要文件
(1)activemq.xml,在此文件中你可以配置activemq的很多东西,比如将消息持久化到
数据库等。
(2)credentials.properties,一些密码,多用于生产和消费的密码认证。
(3)jetty.xml,activemq内置了jetty应用服务器。
(4)jetty-realm.properties,activemq控制台登陆密码。
三:持久化消息到MySQL
1:activemq_install_dir/examples/config目录下有好多示例配置文件可以做参考,如持久化到数据库,安全相关等。
2:将mysql驱动拷贝到activemq_install_dir/lib目录下,并在数据库中创建一个空的数据空的数据库,名称为activemq。
3:修改activemq.xml文件,如下
[
html]