activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkiesel <>
Subject beginner needs help with topology
Date Tue, 08 Aug 2006 16:46:49 GMT

Hi all,

this is my first attempt to use ActiveMQ, so please bear with me if I'm
asking stupid questions.  I did try to find answers in the FAQ, the
docu, and the forums, but I'm still undecided how/what to do.

I have two (identical) Java applications running on tho machines
connected over the Internet.  These two applications act in a
master/slave mode: every action done on the master must be repeated on
the slave.  In case either the network or the slave is down, actions
should be queued so that they can be processed once the slave is online
again. On top of that, there is some transaction logic around these
actions: a group of actions should be either executed completely or not
at all by both the master and the slave. Finally, master and slave must
be able to switch roles (by restarting master and slave with e.g. a
command-line option).

Implementation idea:
I have a central place in the application where all actions pass
through. Basic idea is now to splice in a durable queue or topic (see
below) at this point that sends all actions over to the slave. The
transaction logic will be implemented by adding "begin" and "end"
actions. On startup, both apps look at their queue and either purge (if
they find a "begin" without an "end") or process the queue before
resuming execution.

1) Should I use embedded or standalone brokers? Also what is the
recommended way to XML-configure an embedded broker?
2) Should I use a topic or a composite destination?
3) Should I use brokers on both machines with a network connector for
bridging them or have the slave app connect to the master broker?
4) Can I find out if there is an active sender/publisher for a
queue/topic (so that the slave can decide on startup whether there is
still a chance to get an "end" if he sees a "begin").

While testing, I had some problems with the "two brokers" approach:
after stopping/starting the slave broker, the slave app would no longer
receive messages although both brokers successfully reconnected. This
was even more the case with durable topics.  Is this a known issue?

Sorry for the overlong question!


View this message in context:
Sent from the ActiveMQ - User forum at

View raw message