一、RocketMQ简介
RocketMQ是由阿里捐赠给Apache的一款低延迟、高并发、高可用、高可靠的分布式消息中间件。经历了淘宝双十一的洗礼。RocketMQ既可为分布式应用系统提供异步解耦和削峰填谷的能力,同时也具备互联网应用所需的海量消息堆积、高吞吐、可靠重试等特性。
二、安装RocketMQ-Dashboard
1、下载源代码
[root@localhost ~]# wget https://github.com/apache/rocketmq-dashboard/archive/refs/tags/rocketmq-dashboard-1.0.0.zip
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
[root@localhost ~]# unzip rocketmq-dashboard-1.0.0.zip文章源自小柒网-https://www.yangxingzhen.cn/9366.html
2、安装Maven
[root@localhost ~]# wget https://dlcdn.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.zip
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
[root@localhost ~]# unzip apache-maven-3.9.3-bin.zip
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
[root@localhost ~]# mv apache-maven-3.9.3 /usr/local/maven
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
[root@localhost ~]# ln -sf /usr/local/maven/bin/mvn /usr/bin/文章源自小柒网-https://www.yangxingzhen.cn/9366.html
3、开启登录验证
[root@localhost ~]# cd rocketmq-dashboard-rocketmq-dashboard-1.0.0/src/main/resources
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
[root@localhost resources]# sed -i '/rocketmq.config.loginRequired/s/false/true/' application.properties文章源自小柒网-https://www.yangxingzhen.cn/9366.html
4、配置用户名和密码
# 默认配置
文章源自小柒网-https://www.yangxingzhen.cn/9366.html
# Define Admin admin=Aa123456,1 # Define Users user1=user1 user2=user2 |
注:默认用户名密码admin,这里修改admin密码为Aa123456(线上使用请使用复杂密码)
[root@localhost resources]# vim users.properties
# Define Admin admin=Aa123456,1 |
注:配置格式为:用户名=密码
5、代码编译
[root@localhost resources]# cd ~/rocketmq-dashboard-rocketmq-dashboard-1.0.0
[root@localhost rocketmq-dashboard-rocketmq-dashboard-1.0.0]# mvn clean package -Dmaven.test.skip=true
6、启动RocketMQ-Dashboard
[root@localhost rocketmq-dashboard-rocketmq-dashboard-1.0.0]# cd target
[root@localhost target]# nohup java -jar rocketmq-dashboard-1.0.0.jar &
7、访问RocketMQ-Dashboard
1)浏览器访问http://192.168.56.138:8080/,如下图所示
2)登录RocketMQ-Dashboard
3)连接RocketMQ
4)切换中文语言
5)创建Topic
6)发送消息
# 向指定Topic发送消息
# 发送结果
若文章图片、下载链接等信息出错,请在评论区留言反馈,博主将第一时间更新!如本文“对您有用”,欢迎随意打赏,谢谢!
![weinxin](https://www.yangxingzhen.com/images/weixin.jpg)
![weinxin](https://www.yangxingzhen.com/images/weixingongzhonghao.png)
评论