activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Pickett <>
Subject Multiple instances with ActiveMQ 5.4.1
Date Wed, 13 Oct 2010 16:06:30 GMT
I'm seeing what I think may be some problems with multiple broker instances and AMQ 5.4.1.
 I've checked the docs and haven't found much information on the new scripts.  Before I open
a Jira or investigate/submit a patch, I wanted to make sure my assumptions aren't wrong.

First of all, I'm trying to create and run multiple instances as follows:

1) Create the instances:

$ cd /home/phil/apache-activemq-5.4.1

$ bin/activemq create broker1
$ bin/activemq setup ~/.activemqrc-instance-broker1
$ ln -s activemq bin/activemq-instance-broker1

$ bin/activemq create broker2
$ bin/activemq setup ~/.activemqrc-instance-broker2
$ ln -s activemq bin/activemq-instance-broker2

2) set unique ports for the instances in their conf/activemq.xml and conf/jetty.xml files
as shown below:

$ grep 16  broker[12]/conf/*.xml
broker1/conf/activemq.xml:            <transportConnector name="openwire" uri="tcp://"/>
broker1/conf/jetty.xml:                    <property name="port" value="8161" />
broker2/conf/activemq.xml:            <transportConnector name="openwire" uri="tcp://"/>
broker2/conf/jetty.xml:                    <property name="port" value="8162" />

When I try to start both brokers, I get a "Process with pid XXX is already running" message.
 This is due to the pid file being created in $ACTIVEMQ_HOME/data rather than the instance's
$ACTIVEMQ_BASE/data directory.

For now, my questions are:

1) Should $ACTIVEMQ_HOME point to the AMQ installation directory and $ACTIVEMQ_BASE point
to the specific instance directories?

2) What should be in the ~/.activemqrc-instance-<INSTANCENAME> files?  Should I set
the $ACTIVEMQ_BASE here?  I tried this but it didn't seem to work.

3) Should $ACTIVEMQ_HOME/bin/activemq-instance-<INSTANCENAME> simply be a symbolic link
to the ACTIVEMQ_HOME/bin/activemq script?

4) How should the instances be started?  Using the bin/activemq-instance-<INSTANCENAME>?
 Or using <INSTANCENAME>/bin/<INSTANCENAME> (in my case, broker1/bin/broker1 if
run from $ACTIVEMQ_HOME)



View raw message