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 | 8068afaf533fe54a175382bd52e2b6dd187e1eb8 (patch) | |
| tree | df45e6c477ccf38aab9d5382bc1524dc53784a45 | |
| parent | 0c609a22687ec74b3555279a92c3794a4cfb3f16 (diff) | |
| download | qpid-python-8068afaf533fe54a175382bd52e2b6dd187e1eb8.tar.gz | |
QPID-16 Removed unnecessary requeue operations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@453539 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java | 48 | ||||
| -rw-r--r-- | qpid/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java | 6 |
2 files changed, 0 insertions, 54 deletions
diff --git a/qpid/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java b/qpid/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java index ade832ae5d..481941a128 100644 --- a/qpid/java/broker/src/org/apache/qpid/server/queue/AMQMessage.java +++ b/qpid/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/qpid/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java b/qpid/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java index 3a00a486ae..902e75bf48 100644 --- a/qpid/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java +++ b/qpid/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 { |
