ActiveMQ doesn't provide a way to have replication of messages between
active brokers.  We provide high availability (i.e. the ability to not lose
the messages in a broker that crashes) via master/slave pairs where only
one broker is active at a time and they use (for KahaDB) a shared
filesystem that only the two of them see to ensure that 1) only one of them
is active at a time, and 2) if the current master goes down, the slave can
pick up where the master left off.

Typically it's not possible to set up master/slave pairs for embedded
brokers (even if you tried, usually they would both be embedded in the same
process, so both would exit when one did),so typically it's not possible to
do what you want.  This is one of the limitations of embedded brokers; if
it's an unacceptable one, don't use them and use only standalone ones
instead.

Tim

On Dec 6, 2016 10:57 AM, "JordanC" <jordanchang...@gmail.com> wrote:

> I need some help configuring ActiveMQ to work with my clustered Java
> application. What I want is to be able to run a variable number of nodes
> and
> have messages distributed among the nodes and have high availability such
> that if a node goes down, messaged queued on that node will be processed by
> other nodes.
>
> The configuration I have tried to use is Peer transport. Messages were
> distributed among the nodes which was what I wanted. However, because each
> broker had its own data directory, if a node went down, messages that were
> queued on that node do not get consumed until the node is brought back up.
> I
> thought using a shared directory should fix this however the problem I run
> into is that any nodes whose brokers are waiting to acquire the file lock
> are blocked from processing so only messages sent on a single node can be
> consumed by that node. All other nodes can only queue messages and nothing
> else.
>
> Does using peer transport with a shared data directory not do what I need
> it
> to do? If not, what should the configuration be?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Configuring-peer-transport-with-shared-data-
> directory-tp4719809.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Reply via email to