diff options
author | Gordon Sim <gsim@apache.org> | 2009-03-09 15:58:17 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-03-09 15:58:17 +0000 |
commit | 4bcc963b00b70ea6a718c9f6caca908b879035e4 (patch) | |
tree | f485e0274064af4ce2b86515c7ad90f603d3c364 /qpid/cpp/src/qpid/broker/QueueRegistry.cpp | |
parent | 038d1727cc37edfc9f22ebb71e28f35122366c57 (diff) | |
download | qpid-python-4bcc963b00b70ea6a718c9f6caca908b879035e4.tar.gz |
QPID-1721: Fixes for replication between clusters when new members are added
* suppress event generation during node catch up
* ensure sequence counters used for duplicate detection are synchronised in both primary and dr clusters when new members join
* connect queue with the event manager within queue registry rather than adapter as the latter path is not used for catchup
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@751719 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/QueueRegistry.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/broker/QueueRegistry.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/QueueRegistry.cpp b/qpid/cpp/src/qpid/broker/QueueRegistry.cpp index 2cb801bf83..d079e543c4 100644 --- a/qpid/cpp/src/qpid/broker/QueueRegistry.cpp +++ b/qpid/cpp/src/qpid/broker/QueueRegistry.cpp @@ -19,6 +19,7 @@ * */ #include "QueueRegistry.h" +#include "QueueEvents.h" #include "qpid/log/Statement.h" #include <sstream> #include <assert.h> @@ -27,7 +28,7 @@ using namespace qpid::broker; using namespace qpid::sys; QueueRegistry::QueueRegistry() : - counter(1), store(0), parent(0), lastNode(false) {} + counter(1), store(0), events(0), parent(0), lastNode(false) {} QueueRegistry::~QueueRegistry(){} @@ -43,7 +44,8 @@ QueueRegistry::declare(const string& declareName, bool durable, if (i == queues.end()) { Queue::shared_ptr queue(new Queue(name, autoDelete, durable ? store : 0, owner, parent)); queues[name] = queue; - if (lastNode) queue->setLastNodeFailure(); + if (lastNode) queue->setLastNodeFailure(); + if (events) queue->setQueueEventManager(*events); return std::pair<Queue::shared_ptr, bool>(queue, true); } else { @@ -105,3 +107,7 @@ void QueueRegistry::updateQueueClusterState(bool _lastNode) lastNode = _lastNode; } +void QueueRegistry::setQueueEvents(QueueEvents* e) +{ + events = e; +} |