美文网首页
RocketMQ安装

RocketMQ安装

作者: 咸土豆 | 来源:发表于2019-07-29 09:59 被阅读0次

下载地址:

https://pan.baidu.com/s/1ZtWh3b88iPlwNAfU9u555Q 提取码:bCy8

单机安装:

1、生成配置文件

sh bin/mqbroker -m > broker.p

2、修改配置文件

主要修改namesrvAddr和brokerIP1

3、启动

nohup sh bin/mqnamesrv &

nohup sh bin/mqbroker  -c conf/broker.p &

集群安装:

模式:2m-2s-async、多Master多Slave模式、异步复制

1、修改配置文件

注意修改黑体部分

A机

broker-b-s.properties

brokerClusterName=tl-rocketmq-cluster

brokerName=broker-b

brokerId=1

brokerIP1=hadoop1

namesrvAddr=hadoop1:9876;hadoop2:9876

defaultTopicQueueNums=4

autoCreateTopicEnable=true

autoCreateSubscriptionGroup=true

listenPort=10921

deleteWhen=04

fileReservedTime=120

mapedFileSizeCommitLog=1073741824

mapedFileSizeConsumeQueue=300000

destroyMapedFileIntervalForcibly=120000

redeleteHangedFileInterval=120000

diskMaxUsedSpaceRatio=88

maxMessageSize=65536

storePathRootDir=/usr/local/alibaba-rocketmq/store/slave/

storePathCommitLog=/usr/local/alibaba-rocketmq/store/slave/commitlog

flushCommitLogLeastPages=4

flushConsumeQueueLeastPages=2

flushCommitLogThoroughInterval=10000

flushConsumeQueueThoroughInterval=60000

checkTransactionMessageEnable=false

sendMessageThreadPoolNums=128

pullMessageThreadPoolNums=128

brokerRole=SLAVE

flushDiskType=SYNC_FLUSH

broker-a.properties

brokerClusterName=tl-rocketmq-cluster

brokerName=broker-a

brokerId=0

brokerIP1=hadoop1

namesrvAddr=hadoop1:9876;hadoop2:9876

defaultTopicQueueNums=4

autoCreateTopicEnable=true

autoCreateSubscriptionGroup=true

listenPort=10911

deleteWhen=04

fileReservedTime=120

mapedFileSizeCommitLog=1073741824

mapedFileSizeConsumeQueue=300000

destroyMapedFileIntervalForcibly=120000

redeleteHangedFileInterval=120000

diskMaxUsedSpaceRatio=88

storePathRootDir=/usr/local/alibaba-rocketmq/store/master/

storePathCommitLog=/usr/local/alibaba-rocketmq/store/master/commitlog

maxMessageSize=65536

flushCommitLogLeastPages=4

flushConsumeQueueLeastPages=2

flushCommitLogThoroughInterval=10000

flushConsumeQueueThoroughInterval=60000

checkTransactionMessageEnable=false

sendMessageThreadPoolNums=128

pullMessageThreadPoolNums=128

brokerRole=SYNC_MASTER

flushDiskType=SYNC_FLUSH

B机

broker-a-s.properties

brokerClusterName=tl-rocketmq-cluster

brokerName=broker-a

brokerId=1

brokerIP1=hadoop2

namesrvAddr=hadoop1:9876;hadoop2:9876

defaultTopicQueueNums=4

autoCreateTopicEnable=true

autoCreateSubscriptionGroup=true

listenPort=10921

deleteWhen=04

fileReservedTime=120

mapedFileSizeCommitLog=1073741824

mapedFileSizeConsumeQueue=300000

destroyMapedFileIntervalForcibly=120000

redeleteHangedFileInterval=120000

diskMaxUsedSpaceRatio=88

storePathRootDir=/usr/local/alibaba-rocketmq/store/slave/

storePathCommitLog=/usr/local/alibaba-rocketmq/store/slave/commitlog

maxMessageSize=65536

flushCommitLogLeastPages=4

flushConsumeQueueLeastPages=2

flushCommitLogThoroughInterval=10000

flushConsumeQueueThoroughInterval=60000

checkTransactionMessageEnable=false

sendMessageThreadPoolNums=128

pullMessageThreadPoolNums=128

brokerRole=SLAVE

flushDiskType=SYNC_FLUSH

broker-b.properties

brokerClusterName=tl-rocketmq-cluster

brokerName=broker-b

brokerId=0

brokerIP1=hadoop2

namesrvAddr=hadoop1:9876;hadoop2:9876

defaultTopicQueueNums=4

autoCreateTopicEnable=true

autoCreateSubscriptionGroup=true

listenPort=10911

deleteWhen=04

fileReservedTime=120

mapedFileSizeCommitLog=1073741824

mapedFileSizeConsumeQueue=300000

destroyMapedFileIntervalForcibly=120000

redeleteHangedFileInterval=120000

diskMaxUsedSpaceRatio=88

maxMessageSize=65536

storePathRootDir=/usr/local/alibaba-rocketmq/store/master/

storePathCommitLog=/usr/local/alibaba-rocketmq/store/master/commitlog

flushCommitLogLeastPages=4

flushConsumeQueueLeastPages=2

flushCommitLogThoroughInterval=10000

flushConsumeQueueThoroughInterval=60000

checkTransactionMessageEnable=false

sendMessageThreadPoolNums=128

pullMessageThreadPoolNums=128

brokerRole=SYNC_MASTER

flushDiskType=SYNC_FLUSH

2、启动集群

hadoop1

nohup sh mqnamesrv &

nohup sh bin/mqbroker -c conf/2m-2s-async/broker-a.properties &

nohup sh bin/mqbroker -c conf/2m-2s-async/broker-b-s.properties &

hadoop2

nohup sh mqnamesrv &

nohup sh bin/mqbroker -c conf/2m-2s-async/broker-b.properties &

nohup sh bin/mqbroker -c conf/2m-2s-async/broker-a-s.properties &

相关文章

  • rocketmq

    单机rocketmq一、安装jdk二、安装rocketmq RocketMQ namesrv 启动 RocketM...

  • RocketMQ安装

    1 RocketMQ安装 1.1 RocketMQ下载 1.2 安装 1.2.1 解压rocketmq 1.2.2...

  • Docker之安装RocketMQ

    Docker安装RocketMQ RocketMQ目录 简单介绍 安装Namesrv 安装broker服务器 安装...

  • RocketMQ-基础使用(一)

    零、本文纲要 一、RocketMQ基础 MQ特点 RocketMQ安装 测试RocketMQ 二、RocketMQ...

  • 1、安装RocketMQ

    RocketMQ 安装 官网http://rocketmq.apache.org/[http://rocketmq...

  • RocketMQ安装及可视化插件部署

    一、RocketMQ的安装 1、到RocketMQ官网进行下载,选择对应版本的软件进行安装,RocketMQ官网点...

  • RocketMQ

    安装 安装参考这篇文章 一、简介 二、安装RocketMQ 安装RocketMQ需要jdk1.6, maven,g...

  • RocketMQ 单机部署

    下载 rocketmq 安装包 配置 rocketmq 启动 namesrv、broker 测试 rocketmq...

  • mq安装配置

    软件安装 1.安装目录 一般以${HOME}/project_RocketMQ/rocketmq-${versio...

  • linux安装rocketmq

    安装 unzip rocketmq-all-4.7.0-bin-release.zipmv rocketmq-al...

网友评论

      本文标题:RocketMQ安装

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