hi,

hm from my knowledge your answer is incorrect or maybe I misunderstood you.

You configure your local broker, your output and recieving broker with the 
transport connector. Your network connector defines the brokers where you want 
to connect to. If you have defined more then adress in your static attribute, 
then the broker will connect to all of them.

failover is similar to static, but with the difference that your broker will 
connect to the first broker and when that one is not available it switches to 
the next and so on.

I think the example at http://www.activemq.com/Static+Transport+Reference is a 
bit misleading, because you connect there to your local broker as well as to a 
remote broker.





-----Ursprüngliche Nachricht-----
Von: Javier Leyba [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 10. Mai 2006 13:48
An: [email protected]
Betreff: Re: Network of brokers



On 5/9/06, Naby <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> How must a network of brokers be configured? I found different examples for
> it.
> For example i have two brokers: A and B
> What is the difference between
>
> <networkConnector uri="static:(tcp://A:62626)" failover="true"/>
>
> and
>
> <networkConnector uri="static:(tcp://A:62626,tcp://B:62627)"
> failover="true"/>
>
> ?
>

Hi

I'm not expert but I could share my experience and may be from
activemq team could make a correction if I do a mistake.

You need to configure in this way:

<networkConnector
uri="static:(tcp://A:outputport,tcp://B:transportport)">
failover="true"/>

I mean, the first data is the output port of the broker you are
configuring and the others are server to wich you one to connect and
its transport ports (because brokers receive data from transport)


> And must the two brokers both be written in the client conf like this:
>
> failover:tcp://A:62626,tcp://B:62627
>


You must list in client al servers you want to connect with its transport ports.

In this way, client will try to connect randomly (as far as I
remember) but you can force to assure to connect in the order you
wrtie them.


>
> If the brokers should be started on the same computer with different ports
> do i need run only one activemq.(sh or bat) ti start the brokers or must i
> run 2 brokers in different directories?
>

AFAIK, two brokers in different directories or at least with different
journals. Also, if you are using persistence in DD, they should use
different DB's.


Hope this helps and sorry if I did a mistake with my explanation




--
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar



This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.

This mail has originated outside your organization, either from an external 
partner or the Global Internet. Keep this in mind if you answer this message.

Reply via email to