activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jorussel <>
Subject Re: network of brokers with embedded endpoints
Date Tue, 08 Aug 2006 19:25:03 GMT

I've gotten an embedded broker to work to send intra-JVM messages using the
vm://localhost url in the ActiveMQConnectionFactory constructor.  I have
also used the XML to configure the standalone network of brokers which pass
messages to each other ( really slowly, but I'll work on performance later

What I am having a tough time with is how to get the embedded broker to pass
messages using the vm transport ( method calls from what I read ) for
messages that are only subscribed to  by local components, and to send
messages to the network of brokers if there are consumers out there.  

I've tried the url 


thinking that it would create a vm broker for local traffic and connect up
to remotehost for everything else, but what I got was the following error:

Could not connect to broker URL:
vm:broker:(tcp://remotehost:61616)?jms.copyMessageOnSend=false. Reason: Cannot assign requested address

followed by lots of

 Could not connect to broker URL: vm:broker:(tcp://remotehost:61616).
Reason: Journal is already opened by this application

So I'm guessing its trying to open a port for _listening_ on the remotehost
which would obviously fail.  

So I guess what my question comes down to is what is the magic for
configuring a store and forward embedded broker that uses
DemandForwardingBridge to determine if it can just use the vm transport to
deliver a message locally or the tcp transport to send it up to the network
of brokers for handling . 

Thanks ( I know the directions say to avoid small talk.  Sorry, couldn't
help it. )


James.Strachan wrote:
> Create your embedded brokers configured to store and forward to remote
> brokers then run one or two remote brokers to act as the hub of your
> federated network.
> Use the XML to configure the network...
> On 8/7/06, John Russell <> wrote:
>> I have been reading the documentation on the main site and digging
>> through the forums for a while now.  I think I have figured out the
>> deployment type I need but I am having trouble figuring out how to
>> configure it.  Help would be greatly appreciated.
>> Requirements:
>> - Many components communicate with each other through JMS messages.
>> They can be co-located in the same JVM or on separate boxes.
>> - Reliable message delivery and fault tolerance.
>> What I think I need for deployment:
>> - Network of brokers to allow for scaling up by adding brokers.
>> - DemandForwardingBridge on all brokers to only forward messages when
>> consumers are subscribed to the topics.
>> - Embedded vm:// broker in each JVM where all co-located
>> component's messages are delivered in memory if no-one off box is
>> subscribed and have the embedded broker forward messages off box to
>> the central brokers for message forwarding.
>> Note that I don't think I want peer brokers where all the embedded
>> brokers talk to each other.  I want embedded ones which then connect
>> to a network cloud of brokers which do their magic and deliver
>> messages to other components.
>> What I have now:
>> - Connection configured by passing a url to the
>> ActiveMQConnectionFactory object.  I can get all the components in the
>> same JVM to talk using vm://localhost where the first connection
>> started creates the embedded broker.  Wonderful.
>> I can also get components on different boxes to talk by having a
>> separate activeMQ process running and using the tcp://<hostname>:61616
>> url.  However, this sends all messages, even intra-JVM messages out to
>> the broker.
>> I can't seem to figure out how to set up the embedded brokers as part
>> of a DemandForwardingBridge network of brokers.  I'll name one of my
>> child's stuffed animals after you if you can help me.  Thanks a lot.
>> John
> -- 
> James
> -------
View this message in context:
Sent from the ActiveMQ - User forum at

View raw message