美文网首页
Apache RocketMQ环境搭建

Apache RocketMQ环境搭建

作者: 发光的鱼 | 来源:发表于2017-10-24 13:18 被阅读0次

1.环境要求

1.64bit OS, Linux/Unix/Mac is recommended;
2.64bit JDK 1.8+;
3.Maven 3.2.x
4.Git

2.clone and build source

  > git clone -b develop https://github.com/apache/rocketmq.git
  > cd rocketmq
  > mvn -Prelease-all -DskipTests clean install -U
  > cd distribution/target/apache-rocketmq

3.Start Name Server

  > nohup sh bin/mqnamesrv &
  > tail -f ~/logs/rocketmqlogs/namesrv.log
  The Name Server boot success...

3.Start Broker

  > nohup sh bin/mqbroker -n localhost:9876 &

4.Send & Receive Messages

 > export NAMESRV_ADDR=localhost:9876
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
 SendResult [sendStatus=SEND_OK, msgId= ...

 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
 ConsumeMessageThread_%d Receive New Messages: [MessageExt...

5.Shutdown Servers

> sh bin/mqshutdown broker
The mqbroker(36695) is running...
Send shutdown request to mqbroker(36695) OK

> sh bin/mqshutdown namesrv
The mqnamesrv(36664) is running...
Send shutdown request to mqnamesrv(36664) OK

6.rockmq可视化客户端安装

1. Clone and Build source

  > git clone https://github.com/apache/rocketmq-externals.git
  > cd rocketmq-externals/rocketmq-console
  > mvn package
  > cd target/

2.run

nohub java -jar ./rocketmq-console-ng-1.0.0.jar \
--server.port=xxxx \
--rocketmq.config.namesrvAddr=localhost:9876 &

相关文章

网友评论

      本文标题:Apache RocketMQ环境搭建

      本文链接:https://www.haomeiwen.com/subject/vdrtpxtx.html