Author: kgiusti Date: Wed Apr 4 19:51:30 2012 New Revision: 1309571 URL: http://svn.apache.org/viewvc?rev=1309571&view=rev Log: QPID-3767: fix HA changes
Modified: qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Modified: qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp?rev=1309571&r1=1309570&r2=1309571&view=diff ============================================================================== --- qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp (original) +++ qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp Wed Apr 4 19:51:30 2012 @@ -188,9 +188,11 @@ BrokerReplicator::BrokerReplicator(const { 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 Modified: qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/QueueReplicator.cpp URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/QueueReplicator.cpp?rev=1309571&r1=1309570&r2=1309571&view=diff ============================================================================== --- qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/QueueReplicator.cpp (original) +++ qpid/branches/qpid-3767/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Wed Apr 4 19:51:30 2012 @@ -53,14 +53,14 @@ std::string QueueReplicator::replicatorN 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( --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org