You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by newUser06 <bh...@gmail.com> on 2012/10/22 23:03:37 UTC

Multiple Brokers in same VM

Hi, 
I am new to activeMQ and i am trying to setup 2 instances of activeMQ in the
same VM using network of brokers using discovery. I am using spring to
configure the brokers and they are 2 webapps on the same tomcat

The following logs mentions that connection has been established. But the
messages are accumulated in broker 2 and broker 1 doesnt receive it. Broker1
is configured on port 61716 using tcp and Broker 2 is configured on 61616
using tcp. 

INFO  o.a.a.n.DiscoveryNetworkConnector: Establishing network connection
from vm://localhost?network=true to tcp://broker2:61616
INFO  o.a.a.b.TransportConnector: Connector vm://localhost Started
INFO  o.a.a.n.NetworkConnector: Network Connector
DiscoveryNetworkConnector:broker2:61616:BrokerService[broker2] Started
INFO  c.c.p.v.i.s.d.i.BrokerMgmt: Started broker connection to broker2:61616


I am not sure what is wrong. I suppose the reason could be because Discovery
Network connector is trying to use VM. Can you please let me know if there
is any other way to configure this ?

Thanks 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Multiple-Brokers-in-same-VM-tp4658063.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Multiple Brokers in same VM

Posted by Christian Posta <ch...@gmail.com>.
Can you post the config for your brokers?

For the messages to transfer from a broker to another broker, there has to
be demand, ie, a consumer for the destination on the other broker.

On Mon, Oct 22, 2012 at 2:03 PM, newUser06 <bh...@gmail.com>wrote:

> Hi,
> I am new to activeMQ and i am trying to setup 2 instances of activeMQ in
> the
> same VM using network of brokers using discovery. I am using spring to
> configure the brokers and they are 2 webapps on the same tomcat
>
> The following logs mentions that connection has been established. But the
> messages are accumulated in broker 2 and broker 1 doesnt receive it.
> Broker1
> is configured on port 61716 using tcp and Broker 2 is configured on 61616
> using tcp.
>
> INFO  o.a.a.n.DiscoveryNetworkConnector: Establishing network connection
> from vm://localhost?network=true to tcp://broker2:61616
> INFO  o.a.a.b.TransportConnector: Connector vm://localhost Started
> INFO  o.a.a.n.NetworkConnector: Network Connector
> DiscoveryNetworkConnector:broker2:61616:BrokerService[broker2] Started
> INFO  c.c.p.v.i.s.d.i.BrokerMgmt: Started broker connection to
> broker2:61616
>
>
> I am not sure what is wrong. I suppose the reason could be because
> Discovery
> Network connector is trying to use VM. Can you please let me know if there
> is any other way to configure this ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Multiple-Brokers-in-same-VM-tp4658063.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Multiple Brokers in same VM

Posted by Torsten Mielke <to...@fusesource.com>.
There are a couple of unit tests that setup the same. 
Perhaps have a look in activemq-core/src/test/java/org/apache/activemq/network package for example code.


Regards,

Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On Oct 22, 2012, at 11:03 PM, newUser06 wrote:

> Hi, 
> I am new to activeMQ and i am trying to setup 2 instances of activeMQ in the
> same VM using network of brokers using discovery. I am using spring to
> configure the brokers and they are 2 webapps on the same tomcat
> 
> The following logs mentions that connection has been established. But the
> messages are accumulated in broker 2 and broker 1 doesnt receive it. Broker1
> is configured on port 61716 using tcp and Broker 2 is configured on 61616
> using tcp. 
> 
> INFO  o.a.a.n.DiscoveryNetworkConnector: Establishing network connection
> from vm://localhost?network=true to tcp://broker2:61616
> INFO  o.a.a.b.TransportConnector: Connector vm://localhost Started
> INFO  o.a.a.n.NetworkConnector: Network Connector
> DiscoveryNetworkConnector:broker2:61616:BrokerService[broker2] Started
> INFO  c.c.p.v.i.s.d.i.BrokerMgmt: Started broker connection to broker2:61616
> 
> 
> I am not sure what is wrong. I suppose the reason could be because Discovery
> Network connector is trying to use VM. Can you please let me know if there
> is any other way to configure this ?
> 
> Thanks 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Multiple-Brokers-in-same-VM-tp4658063.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.