ActiveMQ安装以及文件说明

1 下载安装

1.1 官网下载

ActiveMQ 官网: http://activemq.apache.org
在这里插入图片描述

1.2 解压压缩文件

tar -zxf apache-activemq-5.11.0-bin.tar.gz

1.3 操作activemq命令

  • bin/activemq start:启动
  • bin/activemq restart:重启
  • bin/activemq stop:停止

1.4 浏览器登录

使用浏览器访问ActiveMQ 管理应用, 地址如下:http://ip:8161/admin/
用户名: admin
密码: admin

2 配置文件讲解

apache-activemq-5.15.11/conf/*,这个文件下的:activemq.xml, jetty.xml, users.properties,需要关注
任何配置文件修改后,必须重启ActiveMQ,才能生效

2.1 activemq.xml

就是 spring配置文件. 其中配置的是ActiveMQ 应用使用的默认对象组件.
transportConnectors标签 - 配置链接端口信息的. 其中的端口号 61616ActiveMQ 对外发布的tcp协议访问端口. 就是java 代码访问 ActiveMQ 时使用的端口.

 <transportConnectors>
            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        </transportConnectors>

2.2 jetty.xml

spring配置文件, 用于配置jetty服务器的默认对象组件.
jetty 是类似 tomcat 的一个中间件容器.
ActiveMQ 默认支持一个网页版的服务查看站点. 可以实现 ActiveMQ 中消息相关数据的页面查看.
8161 端口, 是ActiveMQ 网页版管理站点的默认端口.
在这里插入图片描述
ActiveMQ 网页版管理站点中,需要登录, 默认的用户名和密码都是 admin.

2.3 users.properties

内容信息: 用户名=密码
是用于配置客户端通过协议访问 ActiveMQ 时,使用的用户名和密码

发布了334 篇原创文章 · 获赞 186 · 访问量 31万+

猜你喜欢

转载自blog.csdn.net/u012060033/article/details/104425354