In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1 Overview
Multi-Master cluster mode means that a cluster has no Slave and is all Maste.
Advantages: simple configuration, single Master downtime or restart maintenance has no impact on the application, even if the machine downtime is irrecoverable when the disk is configured as RAID10
Because the RAID10 disk is very reliable, messages will not be lost (a small amount of messages will be lost in asynchronous flushing, and none in synchronous flushing). The highest performance.
Disadvantages: during the downtime of a single machine, messages that are not consumed on this machine cannot be subscribed until the machine is restored, and the real-time performance of messages will be affected.
1 Environment information serial number IP address hostname user role mode 1192.168.3.41rocketmq01rootnameServer1Magi brokerServer1Master12192.168.42rocketmq02rootnameServer2preparation for brokerServer2Master22 cat > > / etc/hosts > / etc/profile 0 indicates SlavebrokerId=0#nameServer address, semicolon divides namesrvAddr=192.168.3.41:9876 192.168.3.42 topic 987users automatically create topic that does not exist on the server when sending messages. Whether the number of queues created by default defaultTopicQueueNums=4# allows Broker to automatically create Topic, it is recommended that offline enable, online shutdown autoCreateTopicEnable=true# allows Broker to automatically create subscription groups, recommended offline enable, online shutdown listenPort=10911# external service listening port listenPort=10911# delete file point, default deleteWhen=04# file retention time at 4: 00 a.m. Default 48-hour fileReservedTime=120#commitLog size per file default 1GmapedFileSizeCommitLog=1073741824#ConsumeQueue 30W per file by default Adjust mapedFileSizeConsumeQueue=300000#destroyMapedFileIntervalForcibly=120000#redeleteHangedFileInterval=120000# detection physical file disk space diskMaxUsedSpaceRatio=88# storage path storePathRootDir=/usr/local/alibaba-rocketmq/store#commitLog storage path storePathCommitLog=/usr/local/alibaba-rocketmq/store/commitlog# consumption queue storage path storePathConsumeQueue=/usr/local/alibaba-rocketmq/store/consumequeue# message index storage path storePathIndex=/usr/local/alibaba-rocketmq/store/index#checkpoint file storage path storeCheckpoint=/usr/ Local/alibaba-rocketmq/store/checkpoint#abort file storage path abortFile=/usr/local/alibaba-rocketmq/store/abort# limited message size maxMessageSize=65536#flushCommitLogLeastPages=4#flushConsumeQueueLeastPages=2#flushCommitLogThoroughInterval=10000#flushConsumeQueueThoroughInterval=60000#Broker role #-ASYNC_MASTER asynchronous replication Master#- SYNC_MASTER synchronous double write Master#- SLAVEbrokerRole=ASYNC_MASTER# flush mode #-ASYNC_FLUSH asynchronous flush disk #-SYNC_FLUSH synchronous flush flushDiskType=ASYNC_FLUSH#checkTransactionMessageEnable=false# number of sending thread pool # sendMessageThreadPoolNums=128# pull message thread pool # pullMessageThreadPoolNums=128
The broker-b.properties configuration file is as follows:
# brokerClusterName=rocketmq-cluster#broker name of the cluster to which it belongs. Note that different configuration files are filled in here. BrokerName=broker-b#0 indicates Master, > 0 indicates SlavebrokerId=0#nameServer address, and semicolon divides namesrvAddr=192.168.3.41:9876. 192.168.3.42 topic 987users automatically create topic that does not exist on the server when sending messages. Whether the number of queues created by default defaultTopicQueueNums=4# allows Broker to automatically create Topic, it is recommended that offline enable, online shutdown autoCreateTopicEnable=true# allows Broker to automatically create subscription groups, recommended offline enable, online shutdown listenPort=10911# external service listening port listenPort=10911# delete file point, default deleteWhen=04# file retention time at 4: 00 am Default 48-hour fileReservedTime=120#commitLog size per file default 1GmapedFileSizeCommitLog=1073741824#ConsumeQueue 30W per file by default Adjust mapedFileSizeConsumeQueue=300000#destroyMapedFileIntervalForcibly=120000#redeleteHangedFileInterval=120000# detection physical file disk space diskMaxUsedSpaceRatio=88# storage path storePathRootDir=/usr/local/alibaba-rocketmq/store#commitLog storage path storePathCommitLog=/usr/local/alibaba-rocketmq/store/commitlog# consumption queue storage path storePathConsumeQueue=/usr/local/alibaba-rocketmq/store/consumequeue# message index storage path storePathIndex=/usr/local/alibaba-rocketmq/store/index#checkpoint file storage path storeCheckpoint=/usr/ Local/alibaba-rocketmq/store/checkpoint#abort file storage path abortFile=/usr/local/alibaba-rocketmq/store/abort# limited message size maxMessageSize=65536#flushCommitLogLeastPages=4#flushConsumeQueueLeastPages=2#flushCommitLogThoroughInterval=10000#flushConsumeQueueThoroughInterval=60000#Broker role #-ASYNC_MASTER asynchronous replication Master#- SYNC_MASTER synchronous double-write Master#- SLAVEbrokerRole=ASYNC_MASTER# flushing mode #-ASYNC_FLUSH asynchronous flushing #-SYNC_FLUSH synchronous flushing flushDiskType=ASYNC_FLUSH#checkTransactionMessageEnable=false# number of sending thread pool # sendMessageThreadPoolNums=128# pull message Number of thread pools # pullMessageThreadPoolNums=1283.4 modify log configuration file [two machines] mkdir-p / usr/local/rocketmq/logscd / usr/local/rocketmq/conf & & sed-I's modify ${user.home} # / usr/local/rocketmq#g' * .xml3.5 modify startup script parameters [two machines] cd / usr/local/rocketmq/binvim runbroker.sh# modify JAVA_OPT to JAVA_OPT= "${JAVA_OPT}-server- Xms1g-Xmx1g-Xmn512m-XX:PermSize=128m-XX:MaxPermSize=320m "vim runserver.sh# modify JAVA_OPT to JAVA_OPT=" ${JAVA_OPT}-server-Xms1g-Xmx1g-Xmn512m-XX:PermSize=128m-XX:MaxPermSize=320m "3.6 launch NameServer [two machines] cd / usr/local/rocketmq/binnohup sh mqnamesrv & 3.7 launch BrokerServer A [192.168.3.41] cd / usr/local/rocketmq/binnohup sh mqbroker-c / usr/local/rocketmq/conf/2m-noslave/ Broker-a.properties > / dev/null 2 > & 1 & netstat-ntlpjpstail-500f / usr/local/rocketmq/logs/rocketmqlogs/broker.logtail-500f / usr/local/rocketmq/logs/rocketmqlogs/namesrv.log3.8 launch BrokerServer B [192.168.3.42] cd / usr/local/rocketmq/binnohup sh mqbroker-c / usr/local/rocketmq/conf/2m-noslave/broker-b.properties > / dev/null 2 > & 1 & netstat-ntlpjpstail-500f / usr/local/rocketmq/logs/ Rocketmqlogs/broker.logtail-500f / usr/local/rocketmq/logs/rocketmqlogs/namesrv.log
The following is my official account QR code, welcome to follow. If the article is reproduced, please indicate the source www.leexide.com.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.