activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bobsponge <>
Subject Re: Multiple broker instances
Date Tue, 10 Jul 2007 07:58:23 GMT

Hello James,

I need two or more brokers working at the same time in the same machine
because the application is composed of several machines (nodes). Every node
belongs to a group. In general data is transferred between nodes from the
same group, no problem. But a node can bind to another group so the same
node can communicates with two (or more) groups. The information must
separately persists in this node so two brokers are needed, because of the
persistence issues...

I tried to configure the brokers with different names building an URI like
this: tcp://localhost:50000?broker.brokerName=broker1 , but it didn't work
at all. Looking at the activemq source code I found a class named
JmsMultipleBrokersTestSupport where brokers are named using .setName(...), I
tried and it works! 
So it's possible to run more than 1 broker at the same time (but not using
vm transport, it seems to be allowed just one broker per JVM, even with
different names) with different names, as you told me.

Thank you for your help.

James.Strachan wrote:
> On 7/6/07, bobsponge <> wrote:
>> Hello,
>> I'm developing a web application and for some reasons a multi-brokers
>> environment is needed. By multi-broker I mean that I need two independent
>> instances of brokers running, each one configured to access different
>> queues
>> (with different sets of journal and db persistence schemes).
>> I don't really
>> know if this is possible.
> Sounds fine. Though why have 2 brokers in the same JVM?
>> Every time I run the application the first broker
>> is created with no problems but the second one always shows the next
>> exception:
>> org.apache.activemq:BrokerName=localhost,Type=Broker
>> The brokers are created with tcp transports and different ports:
>> tcp://localhost:30000 and tcp://localhost:30001
>> I've tried to change the broker names but it does not works at all...
>> Does any body know if it's possible to run two (or more) brokers in the
>> same
>> application at the same time?
> Hopefully if you run 2 brokers with different names, the JMX stuff
> should just work. If you do that, show us the stack trace you get & we
> can figure it out
> -- 
> James
> -------

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message