The pipeline requires a JMS Queue to transfer messages between the different pipeline services. The LabKey Server currently supports the ActiveMQ
JMS Queue from the Apache Software Foundation.
JMS: Installation Steps
- Choose a server on which to run the JMS Queue
- Install Java
- Install and Configure ActiveMQ
- Test the ActiveMQ Installation
Choose a server to run the JMS Queue
ActiveMQ supports all major operating systems (including Windows, Linux, and OSX). It is common, but not required, for it to be deployed on the LabKey Server web server. For this documentation we will assume you are installing on a Linux based server.
- Install the Java version supported by your server. For details see Supported Technologies.
- Create the JAVA_HOME environmental variable to point at your installation directory.
Install and Configure ActiveMQ
LabKey currently supports ActiveMQ 5.1.0 only.
Download and Unpack the distribution
- Download ActiveMQ from ActiveMQ's download site
- Unpack the binary distribution from into /usr/local
- This will create /usr/local/apache-activemq-5.1.0
- Create the environmental variable <ACTIVEMQ_HOME> and have it point at /usr/local/apache-activemq-5.1.0
Configure logging for the ActiveMQ server
To log all messages sent through the JMSQueue, add the following to the <broker> node in the config file located at <ACTIVEMQ-HOME>/conf/activemq.xml
<!-- lets enable detailed logging in the broker -->
During the installation and testing of the ActiveMQ server, you might want to show the debug output for the JMS Queue software. You can enable this by editing the file <ACTIVEMQ-HOME>/conf/log4j.properties
#log4j.rootLogger=DEBUG, stdout, out
and comment out
log4j.rootLogger=INFO, stdout, out
Authentication, Management and Configuration
- Configure JMX to allow us to use Jconsole and the JMS administration tools monitor the JMS Queue
- We recommend configuring Authentication for your ActiveMQ server. There are number of ways to implement authentication. See http://activemq.apache.org/security.html
- We recommend configuring ActiveMQ to create the required Queues at startup. This can be done by adding the following to the configuration file <ACTIVEMQ-HOME>/conf/activemq.xml
<queue physicalName="job.queue" />
<queue physicalName="status.queue" />
Start the server
To start the ActiveMQ server, you can execute the command below. This command will start the ActiveMQ server with the following settings
- Logs will be written to <ACTIVEMQ_HOME>/data/activemq.log
- StdOut will be written to /usr/local/apache-activemq-5.1.0/smlog
- JMS Queue messages, status information, etc will be stored in <ACTIVEMQ_HOME>/data
- job.queue Queue and status.queue will be durable and persistant. (I.e., messages on the queue will be saved through a restart of the process.)
- We are using AMQ Message Store to store Queue messages and status information
To start the server, execute
<ACTIVEMQ_HOME>/bin/activemq-admin start xbean:<ACTIVEMQ_HOME>/conf/activemq.xml > <ACTIVEMQ_HOME>/smlog 2>&1 &
Monitoring JMS Server, Viewing JMS Queue configuration and Viewing messages on a JMS Queue.
Using the ActiveMQ management tools
Browse the messages on queue by running
<ACTIVEMQ_HOME>/bin/activemq-admin browse --amqurl tcp://localhost:61616 job.queue
View runtime configuration, usage and status of the server information by running