activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jodi Moran" <Jodi.Mo...@betfair.com>
Subject Configuring a network of master/slave pairs
Date Mon, 29 Oct 2007 16:31:18 GMT
Hi all,

I am trying to set up a simple network of two logical brokers, say A and
B, in which each logical broker is a (JDBC) master/slave pair, say A1 &
A2 and B1 & B2. I need to send messages only from A to B (and not B to
A): producers are connected to A and consumers are connected to B. I
want to use "static:" discovery for the network, since A and B will be
in separate data centres.

Originally I tried the following configuration for the network connector
in A1 & A2:
        <networkConnectors>
            <networkConnector name="bridge"
 
uri="static:failover://(tcp://B1_host:B1_port,tcp://B2_host:B2_port)"/>
        </networkConnectors>
This worked correctly at first: the A master connected to the B master,
and messages were delivered from the producers on A to the consumers on
B. When I killed the B master to cause a failover, the B slave became
the new master, the consumers reconnected to the new B master, and a
connection was established between the A master and the new B master.
However, messages were no longer delivered from A to B over the network
connector. 

Noting that this issue:
https://issues.apache.org/activemq/browse/AMQ-734
seems to indicate that the "failover:" transport shouldn't be used with
a network connector, I also tried the following configuration for the
network connector:
        <networkConnectors>
            <networkConnector name="bridge"
 
uri="static://(tcp://B1_host:B1_port,tcp://B2_host:B2_port)"/>
        </networkConnectors>
This configuration works correctly on first boot and also after a
failover (consumers continue to receive messages), except that there
seem to be duplicate messages delivered to some consumers after a
failover. Also, since B1 and B2 are never simultaneously available
(being a master-slave pair), and since this configuration causes the A
master to continuously attempt to connect to both B1 and B2, the A
master's logs are filled with exceptions -- so this would also seem not
to be the correct configuration for my scenario. 

Does anyone know the recommended configuration for creating a network of
master/slave pairs using static discovery? It should be possible
according to these threads:
http://www.nabble.com/Network-of-brokers-tf2546736s2354.html#a8006018
http://www.nabble.com/Master-Slave-and-Network-of-Brokers-tf1790842s2354
.html#a4879091

Many thanks,

-- 
Jodi Moran
Distributed Systems Engineer
Frameworks Team 

Betfair. A Different Kind of Betting Company.
Please consider the environment before printing
Betfair Limited | Winslow Road | Hammersmith Embankment | London | W6
9HP
Registered in England and Wales under company number 5140986

The information in this e-mail and any attachment is confidential and is
intended only for the named recipient(s). The e-mail may not be
disclosed or used by any person other than the addressee, nor may it be
copied in any way. If you are not a named recipient please notify the
sender immediately and delete any copies of this message. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden. Any view or opinions presented are solely
those of the author and do not necessarily represent those of the
company. Betfair (r) and the BETFAIR LOGO are registered trade marks of
The Sporting Exchange Limited.




________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from 
MessageLabs to scan all Incoming and Outgoing mail for viruses.

________________________________________________________________________

Mime
View raw message