You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cc...@apache.org on 2009/01/25 01:41:29 UTC
svn commit: r737460 - in /qpid/trunk/qpid/cpp: INSTALL
src/qpid/broker/Queue.cpp src/qpid/broker/Queue.h
src/qpid/broker/RecoveryManagerImpl.cpp
Author: cctrieloff
Date: Sun Jan 25 00:41:29 2009
New Revision: 737460
URL: http://svn.apache.org/viewvc?rev=737460&view=rev
Log:
QPID-1611 patch from mick
Modified:
qpid/trunk/qpid/cpp/INSTALL
qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
Modified: qpid/trunk/qpid/cpp/INSTALL
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/INSTALL?rev=737460&r1=737459&r2=737460&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/INSTALL (original)
+++ qpid/trunk/qpid/cpp/INSTALL Sun Jan 25 00:41:29 2009
@@ -101,6 +101,10 @@
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.
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=737460&r1=737459&r2=737460&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Sun Jan 25 00:41:29 2009
@@ -705,7 +705,7 @@
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 @@
if (mgmtObject != 0)
mgmtObject->set_arguments (_settings);
+
+ if ( isDurable() && ! getPersistenceId() && ! recovering )
+ store->create(*this, _settings);
}
void Queue::destroy()
@@ -815,16 +818,17 @@
+ (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;
}
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h?rev=737460&r1=737459&r2=737460&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h Sun Jan 25 00:41:29 2009
@@ -163,7 +163,9 @@
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 @@
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);
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp?rev=737460&r1=737459&r2=737460&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp Sun Jan 25 00:41:29 2009
@@ -107,7 +107,7 @@
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) {
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org