summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2012-02-28 22:57:11 +0000
committerRobert Godfrey <rgodfrey@apache.org>2012-02-28 22:57:11 +0000
commit4454b384b0437b35d6d44fbed20a16d723586f70 (patch)
tree4c192e0677f5bc7dffce8a2f8740a60fd141e01e /java/client
parent787d974a36dfd5d70dc49fb3693f0f4a494653d1 (diff)
downloadqpid-python-4454b384b0437b35d6d44fbed20a16d723586f70.tar.gz
QPID-3605 : [Java Broker] Durable subscriber with no-local true receives messages on re-connection
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1294884 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQSession.java4
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index 766237006a..9f3060e2d3 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
@@ -1089,6 +1089,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
// possible to determine when querying the broker whether there are no arguments or just a non-matching selector
// argument, as specifying null for the arguments when querying means they should not be checked at all
args.put(AMQPFilterTypes.JMS_SELECTOR.getValue().toString(), messageSelector == null ? "" : messageSelector);
+ if(noLocal)
+ {
+ args.put(AMQPFilterTypes.NO_LOCAL.getValue().toString(), true);
+ }
// if the queue is bound to the exchange but NOT for this topic and selector, then the JMS spec
// says we must trash the subscription.
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
index 8e9b1fb90f..0fb3650893 100644
--- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
+++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
@@ -199,6 +199,10 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa
// possible to determine when querying the broker whether there are no arguments or just a non-matching selector
// argument, as specifying null for the arguments when querying means they should not be checked at all
ft.put(AMQPFilterTypes.JMS_SELECTOR.getValue(), messageSelector == null ? "" : messageSelector);
+ if(noLocal)
+ {
+ ft.put(AMQPFilterTypes.NO_LOCAL.getValue(), noLocal);
+ }
_arguments = ft;