summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-07-16 12:35:06 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-07-16 12:35:06 +0000
commit94a3e9d3e0b4228bc3e370f90d4c8b26e8073fd9 (patch)
treed4220bb8b730ea31a77259d70313b07b7d6f6148 /qpid/java/client
parentd6bea62aa99a21a133524bc48fd138e93e7f62c0 (diff)
downloadqpid-python-94a3e9d3e0b4228bc3e370f90d4c8b26e8073fd9.tar.gz
QPID-1178 : Prevent Rejecting messages destined for known QueueBrowsers
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@677256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index 2f593ce0c3..544c8014b4 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
@@ -2840,9 +2840,21 @@ public abstract class AMQSession extends Closeable implements Session, QueueSess
}
else
{
- _dispatcherLogger.info("Received a message(" + System.identityHashCode(message) + ")" + "["
- + message.getDeliveryTag() + "] from queue " + " consumer("
- + message.getConsumerTag() + ") is closed rejecting(requeue)...");
+ if (consumer.isNoConsume())
+ {
+ _dispatcherLogger.info("Received a message(" + System.identityHashCode(message) + ")" + "["
+ + message.getDeliveryTag() + "] from queue " + " consumer("
+ + message.getConsumerTag() + ") is closed and a browser so dropping...");
+ //DROP MESSAGE
+ return;
+
+ }
+ else
+ {
+ _dispatcherLogger.info("Received a message(" + System.identityHashCode(message) + ")" + "["
+ + message.getDeliveryTag() + "] from queue " + " consumer("
+ + message.getConsumerTag() + ") is closed rejecting(requeue)...");
+ }
}
}
// Don't reject if we're already closing