In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the steps of building a RabbitMQ cluster under docker". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of building a RabbitMQ cluster under docker.
Docker rabbitmq cluster command installation, RabbitMQ, is a service implementation of AMQP (Advanced message queuing Protocol) written in erlang. To put it simply, it is a powerful message queuing service.
Start multiple RabbitMQ
Docker run-d-- hostname localhost-- name myrabbit-p 15672 rabbitmq:3.6.15-managementdocker run-d-- hostname localhost2-- name myrabbit2-p 15672 rabbitmq:3.6.15-managementdocker run-- p 5672 rabbitmq:3.6.15-managementdocker run-docker run-docker run
Set up RabbitMQ cluster
First, install RabbitMQ
Docker run-d-- hostname rabbit1-- name myrabbit1-p 15672-- p 5672 RABBITMQ_ERLANG_COOKIE='rabbitcookie' rabbitmq:3.6.15-managementdocker run-d-- hostname rabbit2-- name myrabbit2-p 5673-- link myrabbit1:rabbit1-e RABBITMQ_ERLANG_COOKIE='rabbitcookie' rabbitmq:3.6.15-managementdocker run-d-- hostname rabbit3-- name myrabbit3-p 5674name myrabbit1-- link myrabbit1:rabbit1-- link myrabbit2:rabbit2-e RABBITMQ_ERLANG_COOKIE='rabbitcookie' rabbitmq:3.6.15-management
Note: multiple containers use a "- link" connection, this property cannot be reduced; the Erlang Cookie value must be the same, that is, the value of the RABBITMQ_ERLANG_COOKIE parameter must be the same, for reasons see the "configuring the same Erlang Cookie" section below.
Join the RabbitMQ node to the cluster
Set up Node 1:
Docker exec-it myrabbit1 bashrabbitmqctl stop_apprabbitmqctl resetrabbitmqctl start_appexit
Set node 2 and join the cluster:
Docker exec-it myrabbit2 bashrabbitmqctl stop_apprabbitmqctl resetrabbitmqctl join_cluster-- ram rabbit@rabbit1rabbitmqctl start_appexit
The parameter "- ram" indicates that it is set to a memory node, while ignoring the secondary parameter defaults to the disk node.
Set node 3 to join the cluster:
Docker exec-it myrabbit3 bashrabbitmqctl stop_apprabbitmqctl resetrabbitmqctl join_cluster-- ram rabbit@rabbit1rabbitmqctl start_appexit
Once set up, use the http:// physical machine ip:15672 to access it. The default account password is guest/guest.
At this point, I believe you have a deeper understanding of the "steps to build a RabbitMQ cluster under docker". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.