...
Open the
<MB_HOME>/repository/conf/broker.xml
file. This is the root configuration file of WSO2 MB. The changes made to this file must be done in all the WSO2 MB nodes.Do thrift-related configurations. Here you must configure the
thriftServerHost
value to point to the IP address of the MB server node.Localtabgroup Localtab active true title MB Server 1 Code Block language xml <coordination> <nodeID>default</nodeID> <thriftServerHost>192.168.0.102</thriftServerHost> <thriftServerPort>7611</thriftServerPort> <thriftSOTimeout>0</thriftSOTimeout> </coordination>
Localtab title MB Server 2 Code Block language xml <coordination> <nodeID>default</nodeID> <thriftServerHost>192.168.0.103</thriftServerHost> <thriftServerPort>7611</thriftServerPort> <thriftSOTimeout>0</thriftSOTimeout> </coordination>
See the following table for details on these configurations.
Configuration Description coordination
This configuration is related to MB thrift communications.
nodeID
The node ID of each member in a cluster must be unique. In a clustered deployment, an ID is assigned to each MB node via the cluster node identifier. The node ID specified by this parameter can be used to override the cluster node identifier for this MB node. If the node ID is set to 'default', the node ID will be retrieved using the Hazelcast member ID that is specified in the
axis2.xml
file as shown below.Code Block <parameter name="localMemberHost">192.168.0.102</parameter>
Note that when this parameter is set to 'default', the node ID is made up of the '
localMemberHost
' and the 'localMemberPort
' (defined in theaxis2.xml
) as shown below. The 'localMemberHost
' will be the hostname of the server if the hostname can be mapped with the provided IP address. Otherwise, the 'localMemberHost'
will always be the provided IP address.Code Block NODE:localMemberHost:localMemberPort
thriftServerHost
This is a sub-element of the
<coordination>
tag. WSO2 MB uses Apache Thrift for communications relating to message delivery. Therefore, an Apache Thrift server is started in each MB node in a clustered deployment. This element should point to the IP address of the Apache Thrift server. This should point to the IP address of the MB node that hosts the thrift server. The default value for this islocalhost
. For example, if you are configuring a Message Broker node hosted in 192.168.0.102 as the thrift server, this value should be 192.168.0.102.thriftServerPort
This is another sub-element of the
<coordination>
tag. This should point to the port of the thrift server in MB. The default port is 7611. It is recommended to use this port for all broker nodes in your cluster.thriftSOTimeout
This is used to handle half-open TCP connections between the broker nodes in a cluster. In such situations, the socket may need to have a timeout value to invalidate the connection (in milliseconds). A timeout of zero is interpreted as an infinite timeout. Be sure to set this value to 180000 milliseconds as shown below in order to handle a high number of half-open TCP connections.
Code Block <thriftSOTimeout>180000</thriftSOTimeout>
...