We are using Version 5.6.0 in an "JDBC Master Slave" configuration.
In the case that the master looses the connection to the database it stops
the broker. This is the part of JDBCPersistenceAdapter where it happens:

...
    protected void databaseLockKeepAlive() {
        boolean stop = false;
        try {
            DatabaseLocker locker = getDatabaseLocker();
            if (locker != null) {
                if (!locker.keepAlive()) {
                    stop = true;
                }
            }
        } catch (IOException e) {
            LOG.error("Failed to get database when trying keepalive: " + e,
e);
        }
        if (stop) {
            stopBroker();
        }
    }

    protected void stopBroker() {
        // we can no longer keep the lock so lets fail
        LOG.info("No longer able to keep the exclusive lock so giving up
being a master");
        try {
            brokerService.stop();
        } catch (Exception e) {
            LOG.warn("Failure occurred while stopping broker");
        }
    }
...

This behavior was a little unespected to us. The consequence is that this
instance have to be restartet when the network connection comes up again.

It would be nice if such a broker would try to reestablish the connection to
the database and after reconnect becomming a slave. Is there a way to
configure ActiveMQ like this?

I would appreciate any help. Thanks!
Alex



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Broker-stops-after-loosing-database-connection-tp4654845.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to