summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-05-27 14:23:49 +0000
committerGordon Sim <gsim@apache.org>2009-05-27 14:23:49 +0000
commit8a1ff59c51e82a447037cfb9d8e23b1794ad2dcb (patch)
treef8f8f8ac68198a9c0a54036eb662c82b863ac4c2 /cpp/src/qpid/cluster/Connection.cpp
parentcc950c29b060874322441853975a7340b608fc00 (diff)
downloadqpid-python-8a1ff59c51e82a447037cfb9d8e23b1794ad2dcb.tar.gz
QPID-1488: Ensure policy state (+ store state & mgmt stats) are accurate on newly joined nodes by informing
the queue of any logically enqueued messages that are currently acquired (but not accepted or released). QPID-1873: Ensure that the various properties of a queue (durability, exclusivity etc) are correctly replicated to new cluster members. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index dda4b5435b..77bfbe0c6d 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -330,10 +330,12 @@ void Connection::deliveryRecord(const string& qname,
broker::QueuedMessage m;
broker::Queue::shared_ptr queue = findQueue(qname);
if (!ended) { // Has a message
- if (acquired) // Message is on the update queue
+ if (acquired) { // Message is on the update queue
m = getUpdateMessage();
- else // Message at original position in original queue
+ queue->enqueued(m); //inform queue of the message
+ } else { // Message at original position in original queue
m = queue->find(position);
+ }
if (!m.payload)
throw Exception(QPID_MSG("deliveryRecord no update message"));
}
@@ -344,11 +346,6 @@ void Connection::deliveryRecord(const string& qname,
if (completed) dr.complete();
if (ended) dr.setEnded(); // Exsitance of message
semanticState().record(dr); // Part of the session's unacked list.
-
- // If the message was unacked, the newbie broker must place
- // it in its messageStore.
- if ( m.payload && m.payload->isPersistent() && acquired && !ended)
- queue->enqueue ( 0, m.payload );
}
void Connection::queuePosition(const string& qname, const SequenceNumber& position) {