diff options
author | Alan Conway <aconway@apache.org> | 2012-07-31 13:58:36 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-07-31 13:58:36 +0000 |
commit | 221cd0fcbe49acbda7e2d434e759f186afc3afff (patch) | |
tree | 171a800961fcc238d1414f9c840bafafd15d0580 /qpid/cpp/src/qpid/ha/BrokerReplicator.cpp | |
parent | a295ca2b7294353f86405398f7644f73f06ccae4 (diff) | |
download | qpid-python-221cd0fcbe49acbda7e2d434e759f186afc3afff.tar.gz |
QPID-4176: HA Error handling
Fix error handling so that backup brokers shut down on replication errors.
Previously replication errors were being thrown to the primary, breaking the replication
session. This would put the primary into an endless futile reconnect attempt.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1367554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/ha/BrokerReplicator.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/ha/BrokerReplicator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp index 91a4bf242b..6a17555b6f 100644 --- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp @@ -299,10 +299,12 @@ void BrokerReplicator::route(Deliverable& msg) { } catch (const std::exception& e) { QPID_LOG(critical, logPrefix << "Configuration failed: " << e.what() << ": while handling: " << list); + haBroker.shutdown(); throw; } } + void BrokerReplicator::doEventQueueDeclare(Variant::Map& values) { Variant::Map argsMap = asMapVoid(values[ARGS]); bool autoDel = values[AUTODEL].asBool(); @@ -542,7 +544,7 @@ void BrokerReplicator::startQueueReplicator(const boost::shared_ptr<Queue>& queu { if (replicationTest.replicateLevel(queue->getSettings()) == ALL) { boost::shared_ptr<QueueReplicator> qr( - new QueueReplicator(haBroker.getBrokerInfo(), queue, link)); + new QueueReplicator(haBroker, queue, link)); if (!broker.getExchanges().registerExchange(qr)) throw Exception(QPID_MSG("Duplicate queue replicator " << qr->getName())); qr->activate(); |