The XNAT distributed events plugin enables XNAT to propagate events across multiple nodes in a distributed configuration. It uses ActiveMQ's Publish/Subscribe messaging to make critical system events that occur on a single node available to other nodes in a distributed configuration.
Note: The distributed events plugin is intended to be deployed in a distributed XNAT configuration with a shared external ActiveMQ server. While installing this plugin shouldn't cause any issues in a single-XNAT deployment, it won't provide any functionality in that environment.
To build the distributed events plugin, run the following command:
./gradlew clean xnatPluginJarYou can find the newly built plugin jar at:
build/libs/dist-events-1.0.0-SNAPSHOT-xpl.jarTo take advantage of the distributed events functionality, you should have:
- A multi-node XNAT configuration (verify that each node in your multi-node configuration has its own distinct node ID configured in
${XNAT_HOME}/config/node-conf.properties) - An external stand-alone ActiveMQ server
- If your multi-node configuration is using a front-end load balancer such as nginx or traefik, you should make sure it's using sticky sessions
To deploy the distributed events plugin, perform the following procedure for each XNAT server in your deployment:
- Shut down Tomcat
- Copy the plugin jar to the
pluginsfolder for your XNAT server(s) - Restart Tomcat
Once you've installed the plugin to each of your servers, you're ready to being using distributed events.