RocketMQ

作者: SuperGu | 来源:发表于2019-04-13 17:09 被阅读0次

Apache RocketMQ


相关地址

Git地址:https://github.com/apache/incubator-rocketmq

快速入门:https://rocketmq.incubator.apache.org/docs/quick-start/

编译好的文件:https://rocketmq.incubator.apache.org/dowloading/releases/


下载源码并进行编译

>  git clone https://github.com/apache/incubator-rocketmq.git

>  cd incubator-rocketmq

>  mvn clean package install -Prelease-all assembly:assembly -U

>  cd target/apache-rocketmq-all/

Start Name Server

> nohup sh bin/mqnamesrv &

> tailf nohup.out

Start Broker

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

> tailf nohup.out

注意 如果这里启动失败,看一下内存是否足够,可以看一下“runbroker.sh”这个文件,对应的修改参数,如下

JAVA_OPT="-server -Xms4g -Xmx4g -Xmn2g -XX:PermSize=128m -XX:MaxPermSize=320m"

测试发送与接收

> 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

关闭服务

> sh bin/mqshutdown broker

> sh bin/mqshutdown namesrv

相关文章

网友评论

      本文标题:RocketMQ

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