This article mainly introduces the installation of rocketMQ4.4.0, which is mainly divided into four steps: Pull the rocketmq imageThe docker command is as follows docker pull rocketmqinc/rocketmq:4.4.0 Create namesrv Docker Commands docker run -d --name rmqnamesrv -p 9876:9876 -v C:\data\rocketmq\logs:/root/logs -v C:\data\rocketmq\store:/root/store -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq:4.4.0 sh mqnamesrv Parameter Explanation
Create a single broker node Docker Commands
Parameter Explanation
broker.conf file configuration #If there are many nodes, you can configure multiple brokerClusterName = DefaultCluster #broker name, master and slave use the same name, indicating their master-slave relationship brokerName = broker-a #0 means Master, and values greater than 0 mean different slaves brokerId = 0 #Indicates the time to delete the message. The default is 4:00 a.m. deleteWhen = 04 #The length of time to keep messages on disk, in hours fileReservedTime = 48 #There are three values: SYNC_MASTER, ASYNC_MASTER, SLAVE; SYNC and ASYNC represent the mechanism for synchronizing data between Master and Slave; brokerRole = ASYNC_MASTER #Flushing strategy, the value is: ASYNC_FLUSH, SYNC_FLUSH means synchronous flushing and asynchronous flushing; SYNC_FLUSH message returns a success status only after it is written to the disk, ASYNC_FLUSH is not needed; flushDiskType = ASYNC_FLUSH # Set the IP address of the server where the broker node is located namesrvAddr = local IP address: 9876 brokerIP1 = local ip address If the namesrvAddr configuration is not added to the broker.conf configuration file, the following error will be reported when the program is run:
rocketMQ-console service Docker Commands You can directly execute the docker run command instead of using the docker pull command to pull the image. If the image does not exist, the image will be pulled first and then docker run will be executed. docker run -d --name rmqadmin -e "JAVA_OPTS=-Drocketmq.namesrv.addr=172.16.122.115:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8081:8080 pangliang/rocketmq-console-ng Parameter Description
After the rocketmq-console interface container runs successfully, use a browser to open http://127.0.0.1:8081 to enter the rokcetmq-console management interface and see the cluster information, indicating that rocketmq has been installed successfully. Rocketmq-console producer interface error Click Search and an error message appears because the producer uses producer.shutdown() to close the production group after creating it. You can log out with the following code. This is the end of this article about installing rocketMQ in docker and solving problems during the installation process. For more information about installing rocketMQ in docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Summary of JavaScript custom object methods
>>: A brief discussion on the definition and precautions of H tags
Table of contents 1. Function Introduction 2. Key...
This article describes how to enable https servic...
I personally feel that the development framework ...
Transition document address defines a background ...
Table of contents 1. Ubuntu source change 2. Inst...
1. HTML part <Col span="2">Upload...
1. Property List Copy code The code is as follows:...
1. Command Introduction The cal (calendar) comman...
1. Optimize Nginx concurrency [root@proxy ~]# ab ...
1. What is We can split the communication between...
Introduction to Angular Angular is an open source...
The installation of MySQL 8.0.12 took two days an...
1. Dynamically loading scripts As the demand for ...
1. Introduction I wrote an article before: The pr...
gzip is a command often used in Linux systems to ...