本文快速入门,RocketMQ消息系统的安装部署,发送,和接收消息,监控消息,的详细说明。
环境需要
64位操作系统,建议使用Linux / Unix /
CentOs7.3
64bit JDK 1.8+
Maven 3.2.x
Git 1.8.3.1
环境安装
请参考我的另一篇文章
搭建 Apache RocketMQ 单机环境
http://www.ymq.io/2018/02/01/RocketMQ-install
新加项目
新建一个 maven 项目,这里就不详细操作了,大家都会的
不过也可以下载我的示例源码,下载地址如下
GitHub 源码:https://github.com/souyunku/spring-boot-examples/tree/master/spring-boot-rocketmq
添加依赖
在POM 中添加如下依赖
配置文件
在配置文件 添加一下内容
消息生产者
消息消费者
启动服务
控制台会有响应
监控服务
RocketMQ web界面监控RocketMQ-Console-Ng部署
https://github.com/apache/rocketmq-externals/tree/master/rocketmq-console
下载并且编译
下载并且 maven 编译
启动监控服务
地址,默认启动端口8080
访问监控服务
GitHub 源码:https://github.com/souyunku/spring-boot-examples/tree/master/spring-boot-rocketmq
Gitee 源码:https://gitee.com/souyunku/spring-boot-examples/tree/master/spring-boot-rabbitmq
Contact