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>/libdirectory to the
For ActiveMQ 5.8.0 and above:
For earlier versions of ActiveMQ:
cache.propertiesfile in the
<GREG_HOME>/repository/confdirectory as follows,
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