In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is about what the ActiveMQ high-availability cluster solution is. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
There are three main ways to deploy ActiveMQ clusters:
Master-Slave deployment (which is based on shared files and databases)
Broker-Cluster deployment mode
Deployment mode of combining Master-Slave with Broker-Cluster
Shared filesystem Master-Slave deployment mode
Shared database Master-Slave deployment mode
Master-Slave Cluster deployment based on Database
Add the database driver package under the ActiveMQ installation directory / lib/extra
Modify the broker node of the activemq.xml file to enable persistence
Modify persistence policy in activemq.xml file
Add a data source to the activemq.xml file
Copy all the configured activemq to other servers, and start the ActiveMQ cluster to build.
The Master-Slave cluster mainly solves the problem of single point of failure. One node in the Master-Slave cluster dies, while other nodes are still available, and the service is still available. When testing in the code after the cluster is set up, you only need to modify the value of brokerUrl, such as "failover: (tcp://master:61616,tcp://salve:61616)? initialReconnectDelay=100"
Cluster deployment based on Broker-Cluster
Broker-Cluster cluster combines multiple broker through network connection to form a whole. Queues and topic lists are shared among clusters.
The construction of a Broker-Cluster cluster is very simple. You only need to specify the broker information of other nodes to which broker needs to connect in the activemq.xml file. After all broker is started, you can see the connection information in the Network page of the Web management interface.
Example of Static Broker-Cluster deployment configuration:
Example of Dynamic Broker-Cluster deployment configuration:
Cluster with combination of Master-Slave and Broker-Cluster
The Master-Slave cluster solves the problem of a single point of failure, but still only one node handles all requests. Broker-Cluster can achieve load balancing, but it can not solve the problem of single point of failure. The cluster with the combination of Master-Slave and Broker-Cluster can not only solve a single point of failure but also ensure load balancing, achieving high reliability and high availability.
Example of Master-Slave and Broker-Cluster cluster deployment configuration:
Network Connector configuration description
Description of networkConnector configuration properties:
The above is what the ActiveMQ high availability cluster solution is, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.