diff options
author | Steven Shaw <steshaw@apache.org> | 2006-10-06 10:14:27 +0000 |
---|---|---|
committer | Steven Shaw <steshaw@apache.org> | 2006-10-06 10:14:27 +0000 |
commit | 55ad18a1c847c1b14d48c56ce7ee253aadf86ef7 (patch) | |
tree | 628569dcdce19baf04d67774ac5764e9e9fe1da2 | |
parent | a5a13221c8b28b49a3dfaa9a49d943e5e4c9f413 (diff) | |
download | qpid-python-55ad18a1c847c1b14d48c56ce7ee253aadf86ef7.tar.gz |
QPID-16 Removed unnecessary requeue operations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@453539 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/broker/src/org/apache/qpid/server/queue/AMQMessage.java | 48 | ||||
-rw-r--r-- | java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java | 6 |
2 files changed, 0 insertions, 54 deletions
diff --git a/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java b/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java index ade832ae5d..481941a128 100644 --- a/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java +++ b/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java @@ -283,54 +283,6 @@ public class AMQMessage } } - /** - * Used to requeue a message (on delivery where an acknowledgement is - * expected). This will move it to the end of the queue. - */ - public void requeue(AMQQueue queue) throws AMQException - { - if(isPersistent() && queue.isDurable()) - { - if(!_store.inTran()) - { - //if not already in tran, want to be so this is atomic - _store.beginTran(); - try - { - requeueImpl(queue); - _store.commitTran(); - } - catch(AMQException e) - { - _store.abortTran(); - } - } - else - { - //May already be in tran (e.g. if this is called during delivery - //resulting from a commit). - requeueImpl(queue); - } - } - } - - private void requeueImpl(AMQQueue queue) throws AMQException - { - try - { - _store.dequeueMessage(queue.getName(), _messageId); - _store.enqueueMessage(queue.getName(), _messageId); - } - catch(AMQException e) - { - throw e; - } - catch(Throwable t) - { - throw new AMQException("Failure on requeue of message", t); - } - } - public boolean isPersistent() throws AMQException { if(_contentHeaderBody == null) diff --git a/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java b/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java index 3a00a486ae..902e75bf48 100644 --- a/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java +++ b/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java @@ -147,12 +147,6 @@ public class SubscriptionImpl implements Subscription msg.decrementReference(); msg.dequeue(queue); } - else - { - //move the msg to the back of the persistently recorded queue while - //witing for ack - msg.requeue(queue); - } } else { |