You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by joesan <co...@gmail.com> on 2012/08/22 18:28:11 UTC

ActiveMQ Network of Brokers

I"m trying to understand the concept behind the network of brokers in
ActiveMQ. What I understand from the documentation is that by having a
network or broker we can get load balancing. I would assume that load
balancing would mean that the messages are sent to either one of the brokers
(Master or a Slave) depending on the processing capability which is internal
to ActiveMQ. 

But when I use a shared file system, the Master acquired the lock and the
Slave waits indefinitely to acquire the lock. The Slave does not also start
its transport connectors. So with this being the case, how could a network
of brokers offer load balancing?

When the Slave does not even have its transport connectors started, how
could the Master load balance the messages that it gets? I somehow do not
understand the idea behind it.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Network of Brokers

Posted by Chris Pratt <th...@gmail.com>.
The problem is that you're duplicating functionality.  The shared database
means that the two brokers share the information they are receiving by
placing it in a shared location, i.e. the database.  The Network of Brokers
is a different way of sharing the information between the brokers, by
transmitting the information using the configured network connectors.  It
doesn't make sense to do both, since you are sending information, using the
network connectors, to a stalled broker (the slave) that can't possibly do
anything with that information.
  (*Chris*)

On Wed, Aug 22, 2012 at 11:28 AM, joesan <co...@gmail.com> wrote:

> It's not with two hosts, but with two hosts and a shared database, I lock
> the
> second to a waiting state. I got the point. So my earlier understanding was
> correct that with a Master / Slave and a shared database lock, the slave
> will not start it's transport connectors and will wait for the lock.
>
> Like you now mention that I have to have two shared database and two nodes
> of Master / Slave, I can acheive NOB. The point is clarified.
>
> Thanks for helping me out!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655446.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ Network of Brokers

Posted by joesan <co...@gmail.com>.
It's not with two hosts, but with two hosts and a shared database, I lock the
second to a waiting state. I got the point. So my earlier understanding was
correct that with a Master / Slave and a shared database lock, the slave
will not start it's transport connectors and will wait for the lock.

Like you now mention that I have to have two shared database and two nodes
of Master / Slave, I can acheive NOB. The point is clarified. 

Thanks for helping me out!



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655446.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Network of Brokers

Posted by Johan Edstrom <se...@gmail.com>.
With 2 hosts, you lock the second host in a waiting state.
If you have 4 hosts and two shared databases you can have a NOB.

On Aug 22, 2012, at 12:16 PM, joesan <co...@gmail.com> wrote:

> Thanks for the reply. Can you explain me why that with a shared file system I
> cannot have a network of brokers?
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655444.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ Network of Brokers

Posted by joesan <co...@gmail.com>.
Thanks for the reply. Can you explain me why that with a shared file system I
cannot have a network of brokers?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655444.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Network of Brokers

Posted by Johan Edstrom <se...@gmail.com>.
If you have two brokers with a shared database
you cannot also have network connectors
between them, it doesn't make sense.

you can use a failover url for the clients.


On Aug 22, 2012, at 11:56 AM, joesan <co...@gmail.com> wrote:

> When I configure the networkConnector in the activemq.xml file, I'm doing a
> network of brokers. Did I get it correctly?
> 
> When my clients use a failover protocol, it is a failover scenario. Is this
> correct as well?
> 
> In my case, I have both. Something similar to this.
> 
> http://fusesource.com/docs/broker/5.5/clustering/FuseMBClusterFaultTolerenceNetwork.html
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655442.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ Network of Brokers

Posted by joesan <co...@gmail.com>.
When I configure the networkConnector in the activemq.xml file, I'm doing a
network of brokers. Did I get it correctly?

When my clients use a failover protocol, it is a failover scenario. Is this
correct as well?

In my case, I have both. Something similar to this.

http://fusesource.com/docs/broker/5.5/clustering/FuseMBClusterFaultTolerenceNetwork.html



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655442.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Network of Brokers

Posted by Johan Edstrom <se...@gmail.com>.
You are mixing failover with nob.
Not the same thing.

On Aug 22, 2012, at 11:30 AM, joesan <co...@gmail.com> wrote:

> But isn't configuring the networkConnectors with a static discovery in the
> activemq.xml configuration file is a network of brokers?
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655439.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ Network of Brokers

Posted by joesan <co...@gmail.com>.
But isn't configuring the networkConnectors with a static discovery in the
activemq.xml configuration file is a network of brokers?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435p4655439.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Network of Brokers

Posted by Chris Pratt <th...@gmail.com>.
That's not a network of brokers, it's a single broker with a failover.  For
a network of brokers you would need multiple databases.
  (*Chris*)

On Wed, Aug 22, 2012 at 9:28 AM, joesan <co...@gmail.com> wrote:

> I"m trying to understand the concept behind the network of brokers in
> ActiveMQ. What I understand from the documentation is that by having a
> network or broker we can get load balancing. I would assume that load
> balancing would mean that the messages are sent to either one of the
> brokers
> (Master or a Slave) depending on the processing capability which is
> internal
> to ActiveMQ.
>
> But when I use a shared file system, the Master acquired the lock and the
> Slave waits indefinitely to acquire the lock. The Slave does not also start
> its transport connectors. So with this being the case, how could a network
> of brokers offer load balancing?
>
> When the Slave does not even have its transport connectors started, how
> could the Master load balance the messages that it gets? I somehow do not
> understand the idea behind it.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Network-of-Brokers-tp4655435.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>