activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Topology Question
Date Fri, 16 Feb 2007 15:08:03 GMT
On 2/15/07, Rob Bugh <robbugh@earthlink.net> wrote:
>
> Hello All,
>    Is this the forum to ask How-To questons with regards to deploying
> ActiveMQ in a given topology?

Sure!

> My topology
> --------------
> In a nutshell, I have several datacenters that need certain data to be kept
> in sync. One datacenter is on the west coast, one is on the east coast, and
> another is in Europe. Each datacenter has its own database, but one table in
> each of the databases needs to be kept in sync with each other. Each
> datacenter consists of several Tomcat servers fronted by a load balancer and
> a database server.

BTW if all you want is to do database replication, it might be your
database vendor has a solution?


> I've read through the documentation and it seems that a network of brokers
> may be what I need, but I would like to hear from others that have similar
> topologies. Where things get fuzzy for me is trying to determine exactly
> where the brokers will live? My first thought was to put a broker in each
> Tomcat instance, running as a resource. This seems like a good choice since
> it provides broker fail over, but how do you, for instance, point the
> brokers at the west coast datacenter to the ones at the other datacenters?
> Ideally, I want each datacenter to think of the other datacenters as having
> a single broker instead of several embedded into the Tomcat instances. Can
> one broker connect to another through a load balancer?
>
> Applications running on the Tomcat instances that wants to update the table
> in the database would publish to a topic. This would allow the message to be
> seen by all of the datacenters. Topic listeners running as a resource in the
> Tomcat instances would receive the message and update the database. The
> problem with this is, since a topic is used, all listeners will receive the
> message, correct? Meaning, the database will be updated multiple times, once
> per listeners in a single datacenter. Ideally, I want the database to be
> updated once per message.
>
> What are some other ways to use ActiveMQ to solve this problem?

OK here would be my recommendations...

Run one or two brokers per data centres using JDBC master/slave to the
local DB.

Then you can create a durable topic subscription on each data centre
to listen for its own set of updates from ther others ; then you can
either leave the brokers separate and have multiple consumers in each
data centre which connect to each data centre using failover: or you
can use a network to store-and-forward messages from broker-to-broker.

-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message