summaryrefslogtreecommitdiff
path: root/qpid/java
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
commitbd91d29be3a1f51ebad2e618cd5848d98059f777 (patch)
treedc8c5058f896d2ca4235266f5c58b684f3b5b0e5 /qpid/java
parentffb8dcddca58e1277da90b823d7e7ec45a72e488 (diff)
downloadqpid-python-bd91d29be3a1f51ebad2e618cd5848d98059f777.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@679059 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
index f06e3598a7..4b7da30800 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
+++ b/qpid/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));
}
}