环境要求
64bit JDK 1.8+;
Maven 3.2.x;
Git;
4g+ free disk for Broker server
下载安装
unzip rocketmq-all-4.3.2-source-release.zip
cd rocketmq-all-4.3.2/
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/apache-rocketmq
服务启动、停止
## Start NameServer
nohup sh bin/mqnamesrv &
tail -f ~/logs/rocketmqlogs/namesrv.log
## Start Broker
nohup sh bin/mqbroker -n localhost:9876 &
tail -f ~/logs/rocketmqlogs/broker.log
## Shutdown Broker
sh bin/mqshutdown broker
## Shutdown NameServer
sh bin/mqshutdown namesrv
示例运行
export NAMESRV_ADDR=localhost:9876
sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
docker 安装
https://github.com/apache/rocketmq-externals/tree/master/rocketmq-docker
sh play-docker.sh
docker start mqnamesrv | mqbroker
# 控制台安装
docker run -e "JAVA_OPTS=-Drocketmq.namesrv.addr=127.0.0.1:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8080:8080 -t styletang/rocketmq-console-ng