Introduction
In my previous posts, I have covered tutorial about ActiveMQ with the following aspects:
- Installation: ActiveMQ 5.10.0 Installation And Configuration
- Configure Master-Slave Cluster for High Availability: http://ggl-consulting.blogspot.com/2015/01/configure-activemq-for-high-available.html
- Montoring ActiveMQ Using jVisualVM: http://ggl-consulting.blogspot.com/2015/01/monitor-activemq-nodes-using-jmx.html
- Monitoring ActiveMQ Using Tomcat: http://ggl-consulting.blogspot.com/2015/01/monitoring-activemq-using-tomcat-web.html
I have explained how master-slave paradigm with shared file system works. In this post, I will explain more advanced topic, namely, Network Of Brokers. I will demonstrate the procedures to setup a network of ActiveMQ brokers with Master-Slave pairs.
Network Topology
As shown in the above figure, I configured two clusters. The WEST cluster contains two ActiveMQ nodes, namely, north and south. These two node forms a master-slave pair. Depending on applications, the nodes number could be 2 or 3. These nodes sharing the same NFS where the kahaDB is located. The same is for the EAST cluster.
Configurations
Directory Layout
The ActiveMQ is installed at:
/opt/app/activemq/apache-activemq-5.10.0
The tomcat is installed at:
/opt/app/activemq/cluster/master-slave/tomcat/apache-tomcat-8.0.17
north and south nodes
/opt/app/amq/NetworkOfBrokers/cluster/north /opt/app/amq/NetworkOfBrokers/cluster/south
activemq.xml
To setup network of brokers as shown in the introduction, we just need to update the activemq.xml file from west cluster. The file contents is as the following:1 2 36 7 8 12 139 11file:${activemq.conf}/credentials.properties 1019 20 2125 26 12227 45 4628 4429 4330 3731 3332 34 3635 38 4239 4140 47 49 5048 51 90 9162 63 7064 65 6667 6968 81 82 8983 84 8586 8887 92 94 9593 96 108 10997 10798 10099 101 103102 104 106105 110 116 117111 112 113 114 115 118 120 121119
From the above configuration, you can see that I have configured two network connections, namely, Queue_Connector and Topic_Connector. Copy this activemq.xml to both north and south nodes, and leave the east cluster as it is as show my my previous blog of pure master-slave clustering.
No comments:
Post a Comment