diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 1 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/UpdateClient.cpp | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index f260482db9..11b2682575 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -217,7 +217,11 @@ void Queue::requeue(const QueuedMessage& msg){ Mutex::ScopedLock locker(messageLock); if (!isEnqueued(msg)) return; msg.payload->enqueueComplete(); // mark the message as enqueued - messages.push_front(msg); + //put message back in correct position: + Messages::reverse_iterator i = messages.rbegin(); + while (i != messages.rend() && msg.position < i->position) { ++i; } + messages.insert(i.base(), msg); + listeners.populate(copy); // for persistLastNode - don't force a message twice to disk, but force it if no force before diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 6873827b81..841c3b610d 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -378,6 +378,7 @@ void Connection::deliveryRecord(const string& qname, if (acquired) { // Message is on the update queue m = getUpdateMessage(); m.queue = queue.get(); + m.position = position; if (enqueued) queue->enqueued(m); //inform queue of the message } else { // Message at original position in original queue m = queue->find(position); diff --git a/cpp/src/qpid/cluster/UpdateClient.cpp b/cpp/src/qpid/cluster/UpdateClient.cpp index a9761962e8..f263577fd3 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -252,6 +252,7 @@ void UpdateClient::updateQueue(client::AsyncSession& s, const boost::shared_ptr< MessageUpdater updater(q->getName(), s, expiry); q->eachMessage(boost::bind(&MessageUpdater::updateQueuedMessage, &updater, _1)); q->eachBinding(boost::bind(&UpdateClient::updateBinding, this, s, q->getName(), _1)); + ClusterConnectionProxy(s).queuePosition(q->getName(), q->getPosition()); } void UpdateClient::updateExclusiveQueue(const boost::shared_ptr<broker::Queue>& q) { |