Detailed explanation of the deployment process of Docker Alibaba Cloud RocketMQ 4.5.1

Detailed explanation of the deployment process of Docker Alibaba Cloud RocketMQ 4.5.1

Search Mirror

docker search rocketmq

View image version

If you want to view other images, just replace the image name foxiswho/rocketmq with other images.

curl https://registry.hub.docker.com/v1/repositories/foxiswho/rocketmq/tags\
| tr -d '[\[\]" ]' | tr '}' '\n'\
| awk -F: -v image='foxiswho/rocketmq' '{if(NR!=NF && $3 != ""){printf("%s:%s\n",image,$3)}}' 

Start nnameserver

docker run -d -p 9876:9876 --name rmqserver foxiswho/rocketmq:server-4.5.1 

Start the broker

docker run -d -p 10911:10911 -p 10909:10909\
 --name rmqbroker --link rmqserver:namesrv\
 -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt"\
 -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m"\
 foxiswho/rocketmq:broker-4.5.1

Enter the broker container and modify the configuration file

Note: modify your own cloud server public network ip

docker exec -it container id /bin/bash
# Enter the directory and find the configuration file broker.conf
cd /etc/rocketmq
# Modify broker.conf
vim broker.conf
# Add a line at the end to add the server public IP
brokerIP1=47.116.143.16

Restart the broker

docker restart xxx 

Start the UI console

Note: modify your own cloud server public network ip

docker run -d --name rmqconsole -e "JAVA_OPTS=-Drocketmq.namesrv.addr=47.116.143.16:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8080:8080 -t styletang/rocketmq-console-ng 

View Process

docker ps | grep rocketmq

View the UI console

47.116.143.16:8080

Full Notepad

1. Search image docker search rocketmq

2. If you want to view other images, just replace the image name foxiswho/rocketmq with other images. curl https://registry.hub.docker.com/v1/repositories/foxiswho/rocketmq/tags\
| tr -d '[\[\]" ]' | tr '}' '\n'\
| awk -F: -v image='foxiswho/rocketmq' '{if(NR!=NF && $3 != ""){printf("%s:%s\n",image,$3)}}'

3. Start nnameserver
docker run -d -p 9876:9876 --name rmqserver foxiswho/rocketmq:server-4.5.1

4. Start the broker
docker run -d -p 10911:10911 -p 10909:10909\
 --name rmqbroker --link rmqserver:namesrv\
 -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt"\
 -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m"\
 foxiswho/rocketmq:broker-4.5.1


 5. Enter the broker container and modify the configuration file # Enter the container docker exec -it container id /bin/bash
# Enter the directory and find the configuration file broker.conf
cd /etc/rocketmq
# Modify broker.conf
vim broker.conf
# Add a line at the end to add the server public IP
brokerIP1=47.116.143.16

6. Restart the broker
docker restart xxx

7. Start the UI console and change your public IP address.

docker run -d --name rmqconsole -e "JAVA_OPTS=-Drocketmq.namesrv.addr=47.116.143.16:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8080:8080 -t styletang/rocketmq-console-ng

8. View the UI console 47.116.143.16:8080

SpringBoot integrates RocketMQ

Source code download:

http://xiazai.jb51.net/202105/yuanma/springbootrocket_jb51.rar

RocketMQ from Beginner to Mastery

The above is the details of Docker deployment of Alibaba Cloud RocketMQ 4.5.1. For more information about Docker deployment of Alibaba Cloud RocketMQ 4.5.1, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Implementation example of Docker rocketmq deployment

<<:  Sample code for implementing image drawer effect with CSS3

>>:  Implementing password box verification information based on JavaScript

Recommend

An article teaches you JS function inheritance

Table of contents 1. Introduction: 2. Prototype c...

The concrete implementation of JavaScript exclusive thinking

In the previous blog, Xiao Xiong updated the meth...

Detailed explanation of Nginx access restriction configuration

What is Nginx access restriction configuration Ng...

PHP related paths and modification methods in Ubuntu environment

PHP related paths in Ubuntu environment PHP path ...

Split and merge tables in HTML (colspan, rowspan)

The code demonstrates horizontal merging: <!DO...

How to copy MySQL table

Table of contents 1.mysqldump Execution process: ...

Web Design Experience: Efficiently Writing Web Code

Originally, this seventh chapter should be a deep ...

Xhtml special characters collection

nbsp &#160; no-break space = non-breaking spa...

Vue monitoring properties and calculated properties

Table of contents 1. watch monitoring properties ...

CentOS7 upgrade kernel kernel5.0 version

Upgrade process: Original system: CentOS7.3 [root...

MySQL startup error InnoDB: Unable to lock/ibdata1 error

An error message appears when MySQL is started in...

A simple example of MySQL joint table query

MySql uses joined table queries, which may be dif...

CentOS8 installation tutorial of jdk8 / java8 (recommended)

Preface At first, I wanted to use wget to downloa...

Solution to the problem of adaptive height and width of css display table

Definition and Usage The display property specifi...