From bd91d29be3a1f51ebad2e618cd5848d98059f777 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@679059 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qpid/java') 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)); } } -- cgit v1.2.1