diff options
-rw-r--r-- | qpid/cpp/src/qpid/ha/BrokerReplicator.cpp | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 4 |
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( |