activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Network of brokers as a cluster
Date Thu, 06 Nov 2014 17:37:48 GMT
Yes, you can have a pair of brokers that are both active at the same time
and that both have their own independent message store (not master/slave
with a shared message store).  You'll need to configure the brokers so they
can talk to either other (either a duplex networkConnector from one to the
other, or two simplex networkConnectors one in each direction).  Your
client would connect to either broker, and messages would get routed to the
consumer wherever it is.

There are some configuration issues you'll need to think through, such as
the possibility for the messages to be stranded on the "other" broker
because it's already been routed through that broker (look at the Stuck
Messages section of http://activemq.apache.org/networks-of-brokers.html for
more info about your options here) and the possibility for forwarding
between the brokers to result in more network hops than your networkTTL
will allow (you might want to use a large number for that value to avoid
the problem).

Also, if there will be any other brokers in the network, you'll either need
them to connect to your pair with the static: transport or you'll need to
use static:failover: with maxReconnectAttempts=0 and without setting
priorityBackup=true, since priorityBackup doesn't work for broker-to-broker
failover transports.  Or just use the masterslave: transport (which is not
the same as a master/slave broker pair, so don't get confused there), since
it sets the maxReconnectAttempts URI option for you.

Also keep in mind that when a broker goes down, all messages on that broker
are either lost (if they are non-persistent) or held until the broker comes
back up and can try to deliver them (if they are persistent).  If you can't
live with that, then master/slave is really what you want, not a cluster.

On Thu, Nov 6, 2014 at 10:17 AM, jeremy11 <liav.elias@gmail.com> wrote:

> Hi,
>
> can a network of 2 brokers be used to form a cluster? or I need to use
> Master/slave or other option.
> The need is for clustering and that a consumer can disconnect and  connect
> again to the second broker and to receive messages that were sent while it
> was down.
> can messages pass to both of the brokers even all consumer are disconnected
> (in a virtual topic)
> thanks.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Network-of-brokers-as-a-cluster-tp4687028.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message