diff options
| author | Alan Conway <aconway@apache.org> | 2012-07-31 20:57:30 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-07-31 20:57:30 +0000 |
| commit | b459812417130d2bb8169e98cecc6798cf32d305 (patch) | |
| tree | bcb36971c4c7583d0f19daf6823761c252ae7be5 /qpid/cpp/src | |
| parent | eb844a3d021374601c70166aa4e7e3d71de1f63b (diff) | |
| download | qpid-python-b459812417130d2bb8169e98cecc6798cf32d305.tar.gz | |
QPID-4179: Cluster does not replicate exclusive status of queues.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1367776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 3 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/cluster/UpdateClient.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index f2e2150a5a..d5267c78dc 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -178,7 +178,8 @@ Queue::Queue(const string& _name, bool _autodelete, ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { - mgmtObject = new _qmf::Queue(agent, this, parent, _name, _store != 0, _autodelete, _owner != 0); + mgmtObject = new _qmf::Queue(agent, this, parent, _name, _store != 0, _autodelete); + mgmtObject->set_exclusive(_owner != 0); agent->addObject(mgmtObject, 0, store != 0); brokerMgmtObject = (qmf::org::apache::qpid::broker::Broker*) broker->GetManagementObject(); if (brokerMgmtObject) diff --git a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp index a1ec227de7..8737418570 100644 --- a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp @@ -89,6 +89,8 @@ using namespace framing; namespace arg=client::arg; using client::SessionBase_0_10Access; +namespace _qmf = qmf::org::apache::qpid::broker; + // Reserved exchange/queue name for catch-up, avoid clashes with user queues/exchanges. const std::string UpdateClient::UPDATE("x-qpid.cluster-update"); // Name for header used to carry expiration information. @@ -371,13 +373,14 @@ class MessageUpdater { void UpdateClient::updateQueue(client::AsyncSession& s, const boost::shared_ptr<Queue>& q) { broker::Exchange::shared_ptr alternateExchange = q->getAlternateExchange(); + _qmf::Queue* mgmtQueue = dynamic_cast<_qmf::Queue*>(q->GetManagementObject()); s.queueDeclare( arg::queue = q->getName(), arg::durable = q->isDurable(), arg::autoDelete = q->isAutoDelete(), arg::alternateExchange = alternateExchange ? alternateExchange->getName() : "", arg::arguments = q->getSettings(), - arg::exclusive = q->hasExclusiveOwner() + arg::exclusive = mgmtQueue && mgmtQueue->get_exclusive() ); MessageUpdater updater(q->getName(), s, expiry); q->eachMessage(boost::bind(&MessageUpdater::updateQueuedMessage, &updater, _1)); |
