CentOS中RocketMQ如何实现系统优化

2023-04-09 07:34:00 centos 如何实现 系统优化

如何在CentOS上安装RocketMQ

1.下载安装包

wget http://mirror.bit.edu.cn/apache/rocketmq/4.3.0/rocketmq-all-4.3.0-bin-release.zip

2.解压安装包

unzip rocketmq-all-4.3.0-bin-release.zip

3.进入安装目录

cd rocketmq-all-4.3.0-bin-release/

4.启动NameServer

nohup sh bin/mqnamesrv &

5.启动Broker

nohup sh bin/mqbroker -n localhost:9876 &

6.创建Topic

sh bin/mqadmin updateTopic -n localhost:9876 -t test -a test

7.查看Topic

sh bin/mqadmin topicStatus -n localhost:9876 -t test

8.启动消费者

sh bin/mqadmin consumeMessage -n localhost:9876 -g DefaultConsumerGroup -t test

9.启动生产者

sh bin/mqadmin produceMessage -n localhost:9876 -t test -b "Hello World"

相关文章