Activemq installation and master slave setup using shared broker data
Click here to load reader
-
Upload
ramakrishna-narkedamilli -
Category
Technology
-
view
316 -
download
0
Transcript of Activemq installation and master slave setup using shared broker data
ActiveMQ installation and Master Slave Setup using Shared broker
DataBy Ramakrishna Narkedamilli
Overview:
Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.Apache ActiveMQ is fast, supports many Cross Language Clients. Using this we can enable to message throttling, redelivery, delay of messages.
In this Presentation will going to see, how to setup ActiveMQ as Master Slave topology using Shared broker Data.
Download the ActiveMQ installer from here http://activemq.apache.org/activemq-5100-release.html
Extract the downloaded installer (apache-activemq-5.10.0.zip) to C:\apache-activemq-5.10.0_Master.
Extract the downloaded installer (apache-activemq-5.10.0.zip) to C:\apache-activemq-5.10.0_Slave.
Open the activemq.xml available under slave broker (C:\apache-activemq-5.10.0_Slave\conf). Change the port numbers for "openwire" and "amqp" and remove the other transport connectors as those are not required(This is to avoid conflict between master and slave brokers)
Open the jetty.xml available under (C:\apache-activemq-5.10.0_Slave\conf) and change the web console port value to 8162 (As Master broker web console port will have default 8161).
Now both activemq instances are ready to run independently. Its time to set up the master slave topology using shared broker data.
Create a new folder c:\apache_activemq_shared_broker.
Open the activemq.xml available under master broker (C:\apache_activemq-5.10.0_Master\conf) and do the below things
a) Add the below highlighted tag "persistenceAdapter" and point to the above created folder (C:\apache_activemq_shared_broker).
b) Modify the tag "dataDirectory" available at root "broker" tag by pointing to the shared broker directory c:\apache_activemq_shared_broker.
c) Add the new element schedulerSupport="true" in the root "broker" tag.
After all the above changes, activemq.xml file will look like below
Address the same above changes in Salve broker activemq.xml file available at (C:\apache-activemq-5.10.0_Slave\conf).
Now start the Master active broker by running the activemq.bat available at (C:\apache-activemq-5.10.0_Master\bin\Win64\). Here Win64 depends on windows version you’re using. If you’re using 32 bit run active.bat available under Win32 instead of Win64.
Now start the Slave activemq broker by running the activemq.bat available at (C:\apache-activemq-5.10.0_Slave\bin\WIN64). You can observe that slave broker is waiting for the lock and it’s trying to check for every 10 seconds about lock availability.
Now if the master broker becomes unavailable, Slave broker will get the lock and becomes Master. Once unavailable broker has been started then it will join the topology and acts like slave broker.
THANKS YOU By Ramakrishna Narkedamilli