...
The approach is to create a message broker and from each cluster, one node (coordinator) is registered to the broker. When one node gets an update, the broker is notified and the other clusters are notified by the broker to update their cache. First, you need to install the global cache invalidation feature. For information on how to install a feature, see Installing Features.
You can write a custom notification implementation to support different message broker protocols. The default implementation is the JMS protocol.
...
- Download and setup Apache ActiveMQ. Please note that ActiveMQ should be up and running before starting the ESBWSO2 G-Reg.
- Copy the following client libraries from the
<AMQ_HOME>/lib
directory to the<GREG_HOME>/repository/components/lib
directory.For ActiveMQ 5.8.0 and above:
activemq-broker-5.8.0.jar
activemq-client-5.8.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
- hawtbuf-1.9.jar
For earlier versions of ActiveMQ:
activemq-core-5.5.1.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
- geronimo-jms_1.1_spec-1.1.1.jar
Configure the
cache.properties
file in the<GREG_HOME>/repository/conf
directory as follows,Code Block enabled=true class.CacheInvalidationClass=org.wso2.carbon.registry.caching.invalidator.connection.JMSNotification initialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory providerUrl=tcp://localhost:61616 securityPrincipal=guest securityCredentials=guest cacheInvalidateTopic=GlobalCacheInvalidation
...