activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stevo Slavić <ssla...@gmail.com>
Subject Re: Multiple webapps using VM brokers
Date Thu, 13 Jan 2011 00:52:50 GMT
Hello Ryan,

Beginner ActiveMQ user here as well. Had same dilemmas myself today,
at least for the first question of yours. Came to conclusion that each
instance has to have it's own data directory, and that we actually
configure base data directory, so both instances can use the same one,
but have to be given different broker name - it gets appended to the
base data directory path so they'll both have different data directory
within same data.

Regards,
Stevo.

On Thu, Jan 13, 2011 at 1:41 AM, Shelley, Ryan <Ryan.Shelley@disney.com> wrote:
> I'm pretty green to ActiveMQ, but we're diving in and trying to get it to work within
our environment (ActiveMQ 5.2, Java 1.6, RHEL5).  One issue we had, and probably due to my
incomplete comprehension of ActiveMQ, came about when we tried running two webapps that both
used local VM brokers.  We'd get errors where one broker would hang waiting for a lock that
we assume the other webapp had, or we'd get errors about a VM broker already being created.
 We also tried running ActiveMQ as a WAR in Tomcat with our other webapps, but since we couldn't
configure the startup order of the webapps, we had our webapps failing because the ActiveMQ
webapp wasn't up yet.
>
>
>
> So, I suppose my question is multipart.  First, must the data directory for two VM brokers
be different (our config file for ActiveMQ was being shared between webapps, so each VM broker
shared the same URI, brokerName, data directory, etc)?
>
>
>
> Second, is there a way to make the connectivity to a broker delayed (say, until first
request, like Spring's RMI config), or retry gracefully?
>
> Currently, if it fails connecting to a broker at startup, the entire webapp fails.  If
we configure reconnect retry attempts, the webapp will block during startup, which will block
loading other webapps, which may include the ActiveMQ webapp, so it eventually fails.
>
>
>
> Third, what is industry standard (or recommended) approach for setting up ActiveMQ services?
 In a separate, dedicated Tomcat instance?  As the executable (through Jetty)?  As an embedded
VM broker per webapp (or shared VM broker for multiple webapps)?  Some other approach?
>
>
>
> Thanks!
>
> Ryan Shelley
>

Mime
View raw message