You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Craig De La Hunt <cr...@corefreight.com> on 2008/12/01 09:54:03 UTC

Network of Brokers or Standard connections

Hi guys 

I have a situation where we have one server on a public IP and multiple
clients connecting to the server over the internet on a raw internet
connection. The server has no visibility to the clients and each client is a
separate entity and has no visibility to another client.

We have looked at the documentation and done some testing ourselves but at
this stage we do not know which connection architecture we should use. 
We have two opposing thoughts on what type of architecture we should be
using, Network of brokers with store and forward or, standard Hub and Spoke
connections.

The idea of using a network of brokers according to the documentation is
that broker to broker communication is less "Chatty" over a WAN, and that
broker to consumer connections are not designed to be used over a WAN.
The way this would have to be implemented for us, we would have one broker
on our central server and one broker per client.
It also seems that messages are passed from broker to broker until the
message reaches a final broker where the consumer for that queue has a
connection to it, is this a correct understanding?

If we used standard HUB and Spoke type architecture, we would have one
central broker on the server and our client would connect directly to the
central broker.

I was hoping to find some clarity on these issues and maybe a suggestion on
what the best solution would be even if it is completely different to what
we have stated above.
:confused:
-- 
View this message in context: http://www.nabble.com/Network-of-Brokers-or-Standard-connections-tp20768181p20768181.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers or Standard connections

Posted by Rob Davies <ra...@gmail.com>.
Hi Tim,
in-lined:

On 2 Dec 2008, at 14:14, Tim Sparg wrote:

>
> Hi guys
>
> I'm new to ActiveMQ, and am still trying to learn my way around how
> everything works.
>
> I'm trying to find a definitive answer as to the network impact of  
> broker to
> broker communication as opposed to broker to consumer communication.
>
> The "How do distributed queues work" page is a bit vague to me. it  
> says
> "Store and forward is often used in large networks where producers  
> are on
> one LAN and consumers are on another LAN and you wish to use a  
> broker on
> each LAN as a kind of network concentrator to minimise chattiness  
> over the
> WAN between them (and to minimise the number of connections required  
> across
> the WAN too)"
>
> My understanding of the above paragraph is that broker to broker
> communication would reduce network traffic in the case where each  
> individual
> LAN has multiple consumers, as there is only one component talking.
> If each individual LAN only had one consumer(as opposed to multiple)  
> would
> broker to broker communication still have an advantage over broker to
> consumer communication?
No - it wouldn't - with only one consumer - you may as well avoid the  
additional 'hops' of going through a broker
>
> what do you mean when you say that Broker to broker communication  
> generally
> creates less traffic? does that mean that it is according to your
> configuration, or according to the type of distributed messaging you  
> use?
A little of both - basically it will only send one copy of a message  
across the network - which isn't really applicable to Queues. It also  
acts as a buffer, because it will store messages locally to its store  
if the network is down - whilst a normal consumer would block until it  
could reconnect to the remote broker.
>
> -- 
> View this message in context: http://www.nabble.com/Network-of-Brokers-or-Standard-connections-tp20768181p20792976.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Hope that helps a little :)

cheers,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/



Re: Network of Brokers or Standard connections

Posted by Tim Sparg <ti...@corefreight.com>.
Hi guys

I'm new to ActiveMQ, and am still trying to learn my way around how
everything works.

I'm trying to find a definitive answer as to the network impact of broker to
broker communication as opposed to broker to consumer communication.

The "How do distributed queues work" page is a bit vague to me. it says 
"Store and forward is often used in large networks where producers are on
one LAN and consumers are on another LAN and you wish to use a broker on
each LAN as a kind of network concentrator to minimise chattiness over the
WAN between them (and to minimise the number of connections required across
the WAN too)"

My understanding of the above paragraph is that broker to broker
communication would reduce network traffic in the case where each individual
LAN has multiple consumers, as there is only one component talking.
If each individual LAN only had one consumer(as opposed to multiple) would
broker to broker communication still have an advantage over broker to
consumer communication?

what do you mean when you say that Broker to broker communication generally
creates less traffic? does that mean that it is according to your
configuration, or according to the type of distributed messaging you use?
-- 
View this message in context: http://www.nabble.com/Network-of-Brokers-or-Standard-connections-tp20768181p20792976.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers or Standard connections

Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi
> 1) It seems that messages are passed from broker to broker until the message
> reaches a final broker where the consumer for that queue has a connection to
> it. ie. If we have 5 brokers and all have consumers running. If Broker 1
> sends a message(which is intended for Broker 3) to the queue, could the
> message go to broker 2, then to broker 4 and then to broker 3 before it gets
> consumed?
>   
The broker will forward the message only to the broker that has
consumers for the given queue, so it will be consumed there. So if only
broker 3 has an appropriate consumer, the message will not be forwarded
to brokers 2 and 4.

> 2) Is there a difference between "broker to broker communication" and
> "broker to consumer communication" with regards to chattiness over the
> internet (considering the number of connections would be the same regardless
> of the method used ie. if there are 4 clients there will be 4 connections to
> brokers/consumers depending on communication method) 
>
>   
Broker-to-broker communication generally creates less network traffic.

-- 
Dejan Bosanac


http://www.ttmsolutions.com - get a free ActiveMQ user guide

ActiveMQ in Action - http://www.manning.com/snyder/
Scripting in Java - http://www.scriptinginjava.net


Re: Network of Brokers or Standard connections

Posted by Craig De La Hunt <cr...@corefreight.com>.
Hi Dejan,

Thanks for the speedy reply, unfortunately my route forward is still a bit
fuzzy.

Could you please answer the following questions as they concern me the most.

1) It seems that messages are passed from broker to broker until the message
reaches a final broker where the consumer for that queue has a connection to
it. ie. If we have 5 brokers and all have consumers running. If Broker 1
sends a message(which is intended for Broker 3) to the queue, could the
message go to broker 2, then to broker 4 and then to broker 3 before it gets
consumed?

2) Is there a difference between "broker to broker communication" and
"broker to consumer communication" with regards to chattiness over the
internet (considering the number of connections would be the same regardless
of the method used ie. if there are 4 clients there will be 4 connections to
brokers/consumers depending on communication method) 

Thanks for the help.
Cheers 
Craig




Dejan Bosanac-3 wrote:
> 
> Hi Craig,
> 
> you are right, "store and forward" architecture (with networked brokers,
> as you explained) would work much better in a WAN environment. Please
> note that these two approaches are not mutually exclusive, so you can
> have clients that connects directly to the central broker as well (but
> be sure to use failover transport in that case).
> 
> Cheers
> 
> -- 
> Dejan Bosanac
> 
> 
> http://www.ttmsolutions.com - get a free ActiveMQ user guide
> 
> ActiveMQ in Action - http://www.manning.com/snyder/
> Scripting in Java - http://www.scriptinginjava.net
> 
> 
> 
> Craig De La Hunt wrote:
>> Hi guys 
>>
>> I have a situation where we have one server on a public IP and multiple
>> clients connecting to the server over the internet on a raw internet
>> connection. The server has no visibility to the clients and each client
>> is a
>> separate entity and has no visibility to another client.
>>
>> We have looked at the documentation and done some testing ourselves but
>> at
>> this stage we do not know which connection architecture we should use. 
>> We have two opposing thoughts on what type of architecture we should be
>> using, Network of brokers with store and forward or, standard Hub and
>> Spoke
>> connections.
>>
>> The idea of using a network of brokers according to the documentation is
>> that broker to broker communication is less "Chatty" over a WAN, and that
>> broker to consumer connections are not designed to be used over a WAN.
>> The way this would have to be implemented for us, we would have one
>> broker
>> on our central server and one broker per client.
>> It also seems that messages are passed from broker to broker until the
>> message reaches a final broker where the consumer for that queue has a
>> connection to it, is this a correct understanding?
>>
>> If we used standard HUB and Spoke type architecture, we would have one
>> central broker on the server and our client would connect directly to the
>> central broker.
>>
>> I was hoping to find some clarity on these issues and maybe a suggestion
>> on
>> what the best solution would be even if it is completely different to
>> what
>> we have stated above.
>> :confused:
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers-or-Standard-connections-tp20768181p20769766.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers or Standard connections

Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi Craig,

you are right, "store and forward" architecture (with networked brokers,
as you explained) would work much better in a WAN environment. Please
note that these two approaches are not mutually exclusive, so you can
have clients that connects directly to the central broker as well (but
be sure to use failover transport in that case).

Cheers

-- 
Dejan Bosanac


http://www.ttmsolutions.com - get a free ActiveMQ user guide

ActiveMQ in Action - http://www.manning.com/snyder/
Scripting in Java - http://www.scriptinginjava.net



Craig De La Hunt wrote:
> Hi guys 
>
> I have a situation where we have one server on a public IP and multiple
> clients connecting to the server over the internet on a raw internet
> connection. The server has no visibility to the clients and each client is a
> separate entity and has no visibility to another client.
>
> We have looked at the documentation and done some testing ourselves but at
> this stage we do not know which connection architecture we should use. 
> We have two opposing thoughts on what type of architecture we should be
> using, Network of brokers with store and forward or, standard Hub and Spoke
> connections.
>
> The idea of using a network of brokers according to the documentation is
> that broker to broker communication is less "Chatty" over a WAN, and that
> broker to consumer connections are not designed to be used over a WAN.
> The way this would have to be implemented for us, we would have one broker
> on our central server and one broker per client.
> It also seems that messages are passed from broker to broker until the
> message reaches a final broker where the consumer for that queue has a
> connection to it, is this a correct understanding?
>
> If we used standard HUB and Spoke type architecture, we would have one
> central broker on the server and our client would connect directly to the
> central broker.
>
> I was hoping to find some clarity on these issues and maybe a suggestion on
> what the best solution would be even if it is completely different to what
> we have stated above.
> :confused:
>