The Messgae Broker profile in WSO2 EI introduces cluster coordination through an RDBMS. This means that the coordination between the nodes in a cluster can be managed through an RDBMS, just as message persistence. Therefore, the RDBMS that is connected to the MB nodes in the cluster is, by default, used for message persistence as well as cluster coordination. Shown below is the
Use the following configuration in the
xml file (stored in the
<EI_HOME>/wso2/broker/conf/ directory) , which enables RDBMS-based cluster coordination. If required, you can disable the following configuration, which will allow the hazelcast engine to manage cluster coordination. However, note that you need to configure the cluster to handle network partitioning when hazelcastto enable RDBMS-based cluster coordination is used.
<rdbmsBasedCoordination enabled="true"> <!-- Heartbeat interval used in the RDBMS base coordination algorithm in milliseconds --> <heartbeatInterval>5000</heartbeatInterval> <!-- Time to wait before informing others about coordinator change in milliseconds. This value should be larger than a database read time including network latency and should be less than heartbeatInterval --> <coordinatorEntryCreationWaitTime>3000</coordinatorEntryCreationWaitTime> <!-- Time interval used to poll database for membership related events in milliseconds. --> <eventPollingInterval>4000</eventPollingInterval> </rdbmsBasedCoordination> <!-- Enabling this will make the cluster notifications such as Queue changes(additions and deletions), Subscription changes, etc. sent within the cluster be synchronized using RDBMS. If set to false, Hazelcast will be used for this purpose.--> <RDBMSBasedClusterEventSynchronization enabled="true"> <!--Specifies the interval at which, the cluster events will be read from the database. Needs to be declared in milliseconds. Setting this to a very low value could downgrade the performance where as setting this to a large value could increase the time taken for a cluster event to be synchronized in all the nodes in a cluster.--> <eventSyncInterval>1000</eventSyncInterval> </RDBMSBasedClusterEventSynchronization>