Thursday, April 6, 2017

How to test if the registry is mounted properly in a WSO2 ESB Worker Manager Cluster.

In this article I will elaborate the steps required to test the registry mounting in a WSO2 ESB Worker Manager Cluster.

1. Create a file named abc.txt in the registry ("/_system/governance" path) with the below configuration.

<property name="test" value="Sampletest"/>

2. Add the below proxy service to the manager node.

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="testProxy"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <log level="custom">
            <property name="###########symbol#########"
                      expression="get-property('registry','gov:/abc.txt')"/>
         </log>
         <drop/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
      <endpoint>
         <address uri="http://www.google.com"/>
      </endpoint>
   </target>
   <description/>
</proxy>


3. Send a single request to a worker and look for a log as below.

[2016-10-05 21:47:04,728]  INFO - LogMediator ###########symbol######### = <property name="test" value="Sampletest"/>

4. Change the registry saved value to "Sampletest123".

5. Send another request to the worker after changing the above resource value and look for a log as below. See whether it has logged the changed property value. If it has changed that means registry mounting works properly.

[2016-10-05 21:48:06,488]  INFO - LogMediator ###########symbol######### = <property name="test" value="Sampletest123"/>

Please refer [1] for clustering WSO2 ESB.

[1] https://docs.wso2.com/display/CLUSTER44x/Clustering+ESB+4.9.0#ClusteringESB4.9.0-Configuringtheloadbalancer

No comments:

Post a Comment