summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-07-23 10:30:26 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-07-23 10:30:26 +0000
commitf909f338fe2ea66e50e5923fcd008ae2ae9ccd67 (patch)
tree7276494c2429723f9f0d0749696081cdcd165d9b
parentf0cf4ae2afe59441b23fcd3b6cba5529ee3ac151 (diff)
downloadqpid-python-f909f338fe2ea66e50e5923fcd008ae2ae9ccd67.tar.gz
QPID-1187 : The broker did not correctly handle subscriptions that would suspend due to exhaustion of bytes credit. The processQueue loop would spin, this fix marks the subscription inactive for that loop in processQueue so it will stop processing that subscription and ultimately the whole processQueue loop if required.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679059 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
index f06e3598a7..4b7da30800 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
@@ -1397,8 +1397,12 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
}
done = false;
}
- else
+ else // Not enough Credit for message and wouldSuspend
{
+ //QPID-1187 - Treat the subscription as suspended for this message
+ // and wait for the message to be removed to continue delivery.
+ subActive = false;
+
node.addStateChangeListener(new QueueEntryListener(sub, node));
}
}