diff options
-rw-r--r-- | cpp/INSTALL | 4 | ||||
-rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 10 | ||||
-rw-r--r-- | cpp/src/qpid/broker/Queue.h | 7 | ||||
-rw-r--r-- | cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/cpp/INSTALL b/cpp/INSTALL index 1760ae2706..fc7f5f602e 100644 --- a/cpp/INSTALL +++ b/cpp/INSTALL @@ -101,6 +101,10 @@ The optional clustering packages changed name in Fedora 10. On Fedora 9 or earli On Fedora 10 or later # yum install corosync-devel cmanlib-devel +For SASL and SSL, include + # yum install cyrussasl-devel + + Follow the manual installation instruction below for any packages not available through your distributions packaging tool. diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index d459c64c54..f3cdc03f7d 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -705,7 +705,7 @@ void Queue::create(const FieldTable& _settings) configure(_settings); } -void Queue::configure(const FieldTable& _settings) +void Queue::configure(const FieldTable& _settings, bool recovering) { setPolicy(QueuePolicy::createQueuePolicy(_settings)); //set this regardless of owner to allow use of no-local with exclusive consumers also @@ -736,6 +736,9 @@ void Queue::configure(const FieldTable& _settings) if (mgmtObject != 0) mgmtObject->set_arguments (_settings); + + if ( isDurable() && ! getPersistenceId() && ! recovering ) + store->create(*this, _settings); } void Queue::destroy() @@ -815,16 +818,17 @@ uint32_t Queue::encodedSize() const + (policy.get() ? (*policy).encodedSize() : 0); } -Queue::shared_ptr Queue::decode(QueueRegistry& queues, Buffer& buffer) +Queue::shared_ptr Queue::decode ( QueueRegistry& queues, Buffer& buffer, bool recovering ) { string name; buffer.getShortString(name); std::pair<Queue::shared_ptr, bool> result = queues.declare(name, true); buffer.get(result.first->settings); - result.first->configure(result.first->settings); + result.first->configure(result.first->settings, recovering ); if (result.first->policy.get() && buffer.available() >= result.first->policy->encodedSize()) { buffer.get ( *(result.first->policy) ); } + return result.first; } diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h index 394b5fd054..e4bcded8bd 100644 --- a/cpp/src/qpid/broker/Queue.h +++ b/cpp/src/qpid/broker/Queue.h @@ -163,7 +163,9 @@ namespace qpid { bool checkForMessages(Consumer::shared_ptr); void create(const qpid::framing::FieldTable& settings); - void configure(const qpid::framing::FieldTable& settings); + + // "recovering" means we are doing a MessageStore recovery. + void configure(const qpid::framing::FieldTable& settings, bool recovering = false); void destroy(); void bound(const string& exchange, const string& key, const qpid::framing::FieldTable& args); void unbind(ExchangeRegistry& exchanges, Queue::shared_ptr shared_ref); @@ -253,7 +255,8 @@ namespace qpid { void encode(framing::Buffer& buffer) const; uint32_t encodedSize() const; - static Queue::shared_ptr decode(QueueRegistry& queues, framing::Buffer& buffer); + // "recovering" means we are doing a MessageStore recovery. + static Queue::shared_ptr decode(QueueRegistry& queues, framing::Buffer& buffer, bool recovering = false ); static void tryAutoDelete(Broker& broker, Queue::shared_ptr); virtual void setExternalQueueStore(ExternalQueueStore* inst); diff --git a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index d3eacefc3c..8030cf7d0e 100644 --- a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -107,7 +107,7 @@ RecoverableExchange::shared_ptr RecoveryManagerImpl::recoverExchange(framing::Bu RecoverableQueue::shared_ptr RecoveryManagerImpl::recoverQueue(framing::Buffer& buffer) { - Queue::shared_ptr queue = Queue::decode(queues, buffer); + Queue::shared_ptr queue = Queue::decode(queues, buffer, true); try { Exchange::shared_ptr exchange = exchanges.getDefault(); if (exchange) { |