ActiveMQ 5.x does not have the ability to write to multiple persistence
stores at once, so this is not possible in ActiveMQ 5.x using a single
broker.  Depending on your requirements, it might or might not be possible
using multiple brokers.

Most people who ask about failover mean that persistent messages sent to
broker A are available to be picked up seamlessly (and in order) by broker
B when it takes over, and then messages sent to B while A are down are
available to A if it takes back over as the master.  If that's what you
mean, then no, this is not possible in ActiveMQ 5.x.  Artemis might be able
to do something like this since I believe they support in-cluster
replication, but I'm not an expert on Artemis so I defer to those who are.

If what you mean is instead simply that clients can send and receive new
messages via the new broker, but you're willing to accept the
unavailability of messages in A when A goes down (until it comes back up),
that's possible.  You would configure A to use MySQL and B to use KahaDB,
and have all clients use a failover transport URI that prioritized A over B
(via randomize=false and the priorityBackup feature).  If you wanted to
ensure that messages sent to B while A is down are not stranded when
everyone abandons B to go back to A, you could use a networkConnector to
connect A and B in a Network of Brokers configuration, but if you're
willing to accept losing those messages (and a period of partial
degradation between when A comes back up and when the last consumer on B
detects that A is available and fails back to it), you can just make A and
B completely standalone brokers.

Tim

On Sat, May 6, 2017 at 1:08 PM, racarlson <racarl...@mediacomcc.com> wrote:

> we use mysql with activemq cluster. I can configure it to work with c3p0
> when
> db is down and retry but I would like to have activemq failover to kahadb
> when database is down. Is this possible?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/is-it-possible-to-have-activemq-failover-to-
> kahadb-if-mysql-is-down-tp4725724.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Reply via email to