Wednesday, May 20, 2015

View Hazelcast Management Center for WSO2 Message Broker 3.0.0.

WSO2 products allows to use multiple instances to form a cluster and divide up the work to enhance the performance and reliability of their intended processes[1]. WSO2 Message Broker 3.0.0 uses Hazelcast[2] to communicate within the instances of a cluster and is heavily depended on on it when it comes message delivering scenarios and etc. The following post is on how to access the hazelcast management center[3] of the Message Broker(s). The hazelcast management center helps to monitor the overall state of the cluster.

Lets see how we can make it happen. The following prerequisites are needed :
  • A WSO2 Message Broker cluster(clustering enabled).
  • Tomcat to host hazelcast management center.

First we have to modify the axis2.xml file of all the instances. Access the "axis2.xml" file in the following path.
<WSO2_PRODUCT>/repository/conf/axis2/axis2.xml
At the bottom of the file in the "clustering" section, the following commented line can be seen.
<!--<parameter name="mgtCenterURL">http://localhost:8081/mancenter/</parameter>-->
Uncomment the line and modify the port to 8080. This is the default port in tomcat which we will get back later.
<parameter name="mgtCenterURL">http://localhost:8080/mancenter/</parameter>
Startup the Message Broker instance(s) afterwards.

Now lets host the hazelcast management center.

To do this we need to get the "mancenter-3.2.6.war" file from the hazelcast official site. The version of the war file should be the exact hazelcast version that is being used in WSO2 Message Broker. I.E current version is 3.2.6

Download Hazelcast - The war file is included.

After downloading, place the "mancenter-3.2.6.war" file in the "<TOMCAT_HOME>/webapps" folder and rename the war file to "mancenter.war". Start up the tomcat server using "./startup.sh" in the "bin" folder of tomcat.

Then go to the following URL :
http://localhost:8080/mancenter/

Login to the hazelcast management center using username and password as "admin" and "admin". Once logged in, you should see the hazelcast management center.

Following are several images of the hazelcast management center.


This mentioned solution should also work with other WSO2 products which uses hazelcast for clustering. But I have not tested them out. I do not guarantee this solution will work or held responsible.

[1] - https://docs.wso2.com/display/CLUSTER420/Overview
[2] - http://hazelcast.org/
[3] - http://docs.hazelcast.org/docs/latest/manual/html/managementcenter.html

Thanks,
Hemika

No comments:

Post a Comment