rocketMQ-Quick Start
start rocketmq Quick
2023-09-11 14:21:57 时间
Quick Start
This quick start guide is a detailed instruction of setting up RocketMQ messaging system on your local machine
to send and receive messages.
ON THIS PAGE
- PREREQUISITE
- DOWNLOAD & BUILD FROM RELEASE
- START NAME SERVER
- START BROKER
- SEND & RECEIVE MESSAGES
- SHUTDOWN SERVERS
Prerequisite
The following softwares are assumed installed:
- 64bit OS, Linux/Unix/Mac is recommended;
- 64bit JDK 1.8+;
- Maven 3.2.x;
- Git;
- 4g+ free disk for Broker server
Download & Build from Release
Click here to download the 4.4.0 source release. Also you could download a binary release from here.
Now execute the following commands to unpack 4.4.0 source release and build the binary artifact.
> unzip rocketmq-all-4.4.0-source-release.zip
> cd rocketmq-all-4.4.0/
> mvn -Prelease-all -DskipTests clean install -U
> cd distribution/target/apache-rocketmq
Start Name Server
> nohup sh bin/mqnamesrv &
> tail -f ~/logs/rocketmqlogs/namesrv.log
The Name Server boot success...
Start Broker
> nohup sh bin/mqbroker -n localhost:9876 &
> tail -f ~/logs/rocketmqlogs/broker.log
The broker[%s, 172.30.30.233:10911] boot success...
Send & Receive Messages
Before sending/receiving messages, we need to tell clients the location of name servers. RocketMQ provides multiple ways to achieve this. For simplicity, we use environment variable NAMESRV_ADDR
> 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...
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
相关文章
- 玩转系统|如何关闭Microsoft start方法介绍
- 【oracle 11G Grid 】Crsctl start cluster 和 crsctl start crs 有差别么?
- StepVR插件容易出现的坑------项目设置一定要勾选Start in VR或者在exe快捷方式中添加-vr参数
- egg 执行 yarn start 失败的解决方案
- PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start. 报错解决
- ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
- APPLICATION FAILED TO START 报错
- REST API disable / enable service auto start by API
- Linux-026-Centos Nginx 配置 pid 文件路径解决 service nginx status 提示:Can't open PID file /var/run/nginx.pid (yet?) after start: No such file or directory
- 用DotNetOpenAuth实现基于OAuth 2.0的web api授权 (一)Getting Start
- 浅析CentOS安装docker及遇到的问题:Failed to start docker.service: Unit not found或docker: command not found
- Media start error原因分析及解决方法
- START WITH...CONNECT BY PRIOR详解
- ohasd failed to start: Inappropriate ioctl for device
- SQL基础-->层次化查询(START BY ... CONNECT BY PRIOR)
- mysql报错:Can’t start server: Bind on TCP/IP port: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。
- rocketMQ-Quick Start