From f909f338fe2ea66e50e5923fcd008ae2ae9ccd67 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Wed, 23 Jul 2008 10:30:26 +0000 Subject: 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 --- .../src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)); } } -- cgit v1.2.1