diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2010-01-28 16:52:38 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2010-01-28 16:52:38 +0000 |
| commit | 3497e9fd4f8d10052d3b11e4715bc66bf78a8755 (patch) | |
| tree | 76019b3d0ba0c8d51b6944e529a43dfda0f612a7 /qpid/cpp/src | |
| parent | 1e62c0e40ec5bdf17daaed8847136dbbe537cf9d (diff) | |
| download | qpid-python-3497e9fd4f8d10052d3b11e4715bc66bf78a8755.tar.gz | |
Fix for QPID-2373 - Durable exchange state not replicated to broker joining cluster
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@904154 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp | 3 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/cluster/Connection.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp b/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp index 951cdbd395..f4a860fa1e 100644 --- a/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp +++ b/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp @@ -54,8 +54,7 @@ pair<Exchange::shared_ptr, bool> ExchangeRegistry::declare(const string& name, c exchange = Exchange::shared_ptr(new HeadersExchange(name, durable, args, parent, broker)); }else if (type == ManagementExchange::typeName) { exchange = Exchange::shared_ptr(new ManagementExchange(name, durable, args, parent, broker)); - } - else{ + }else{ FunctionMap::iterator i = factory.find(type); if (i == factory.end()) { throw UnknownExchangeTypeException(); diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp index 1c6be4e862..3f37d63255 100644 --- a/qpid/cpp/src/qpid/cluster/Connection.cpp +++ b/qpid/cpp/src/qpid/cluster/Connection.cpp @@ -477,6 +477,9 @@ void Connection::accumulatedAck(const qpid::framing::SequenceSet& s) { void Connection::exchange(const std::string& encoded) { Buffer buf(const_cast<char*>(encoded.data()), encoded.size()); broker::Exchange::shared_ptr ex = broker::Exchange::decode(cluster.getBroker().getExchanges(), buf); + if(ex.get() && ex->isDurable() && !ex->getName().find("amq.") == 0 && !ex->getName().find("qpid.") == 0) { + cluster.getBroker().getStore().create(*(ex.get()), ex->getArgs()); + } QPID_LOG(debug, cluster << " updated exchange " << ex->getName()); } |
