summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2012-04-04 19:51:30 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2012-04-04 19:51:30 +0000
commita217e2a9a218e0fabd5a96122ab629ef33f8ea27 (patch)
tree1c387f4e7d0c9a8d6d6fd42124c1bdaa8675acab
parent39406ef3d5c6b286fb14742f4635a1b8a86f9668 (diff)
downloadqpid-python-a217e2a9a218e0fabd5a96122ab629ef33f8ea27.tar.gz
QPID-3767: fix HA changes
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3767@1309571 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/ha/BrokerReplicator.cpp6
-rw-r--r--qpid/cpp/src/qpid/ha/QueueReplicator.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
index 915cee9e58..039ec8c623 100644
--- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
+++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
@@ -188,9 +188,11 @@ BrokerReplicator::BrokerReplicator(const boost::shared_ptr<Link>& l)
{
QPID_LOG(info, "HA: Backup replicating from " <<
link->getTransport() << ":" << link->getHost() << ":" << link->getPort());
+ framing::Uuid uuid(true);
+ const std::string name(QPID_CONFIGURATION_REPLICATOR + ".bridge." + uuid.str());
broker.getLinks().declare(
- QPID_CONFIGURATION_REPLICATOR + ".bridge", // name for bridge
- *link,
+ name, // name for bridge
+ *link, // parent
false, // durable
QPID_CONFIGURATION_REPLICATOR, // src
QPID_CONFIGURATION_REPLICATOR, // dest
diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
index 13e9079c7f..0c725ebce0 100644
--- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
+++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
@@ -53,14 +53,14 @@ std::string QueueReplicator::replicatorName(const std::string& queueName) {
QueueReplicator::QueueReplicator(boost::shared_ptr<Queue> q, boost::shared_ptr<Link> l)
: Exchange(replicatorName(q->getName()), 0, q->getBroker()), queue(q), link(l)
{
- bridgeName = replicatorName(q->getName());
+ framing::Uuid uuid(true);
+ bridgeName = replicatorName(q->getName()) + std::string(".") + uuid.str();
logPrefix = "HA: Backup " + queue->getName() + ": ";
QPID_LOG(info, logPrefix << "Created, settings: " << q->getSettings());
}
// This must be separate from the constructor so we can call shared_from_this.
void QueueReplicator::activate() {
- // Create a new route over the link
sys::Mutex::ScopedLock l(lock);
std::pair<Bridge::shared_ptr, bool> result =
queue->getBroker()->getLinks().declare(