RocketMQ 是一款分布式、队列模型的消息中间件,具有以下特点:
- 能够保证严格的消息顺序
- 提供丰富的消息拉取模式
- 高效的订阅者水平扩展能力
- 实时的消息订阅机制
- 亿级消息堆积能力
今天开始试着理解她。
快速开始
环境要求
- 64bit OS, Linux/Unix/Mac is recommended;
- 64bit JDK 1.8+;
- Maven 3.2.x
- Git
准备工作
下载安装包 here 到服务器中,本文使用的是rocketmq-all-4.2.0
。
unzip rocketmq-all-4.2.0-source-release.zip
cd rocketmq-all-4.2.0/
mvn -Prelease-all -DskipTests clean install -U
没有注意环境,maven 版本为 3.0.5,升级 maven 到 3.5.2
> cd distribution/target/apache-rocketmq
启动 Name Server
> nohup sh bin/mqnamesrv &
> tail -f ~/logs/rocketmqlogs/namesrv.log
> The Name Server boot success…
启动 Broker
> nohup sh bin/mqbroker -n localhost:9876 &
> tail -f ~/logs/rocketmqlogs/broker.log
错误:启动不成功,看错误日志
|
|