diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2012-12-07 22:53:05 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2012-12-07 22:53:05 +0000 |
| commit | 2fbcab25301387e793c4e6b2bf3679b5fff3c013 (patch) | |
| tree | 8b4911cf13fd065b7ec6977cd90de65fec5ddcd4 /java/client | |
| parent | ffff24623261dc69bc369bb19cb6cc9f5dad3b4e (diff) | |
| download | qpid-python-2fbcab25301387e793c4e6b2bf3679b5fff3c013.tar.gz | |
QPID-4497 Allow the exclusive property to be set for the subscription
queue.
QPID-3317 We now throw an exception if a subscription queue is marked
durable without providing a queue name.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1418541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 5 | ||||
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index dc4a4be496..76a18b70d9 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -1329,6 +1329,11 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic arguments.put(AddressHelper.NO_LOCAL, noLocal); } + if (link.isDurable() && queueName.startsWith("TempQueue")) + { + throw new AMQException("You cannot mark a subscription queue as durable without providing a name for the link."); + } + getQpidSession().queueDeclare(queueName, queueProps.getAlternateExchange(), arguments, queueProps.isAutoDelete() ? Option.AUTO_DELETE : Option.NONE, diff --git a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java b/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java index 9b291b48f7..72fc74e19c 100644 --- a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java +++ b/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java @@ -283,7 +283,7 @@ public class AddressHelper { MapAccessor xDeclareMapAccessor = new MapAccessor(xDeclareMap); queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,AUTO_DELETE,true)); - queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,true)); + queue.setExclusive(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,true)); queue.setAlternateExchange(xDeclareMapAccessor.getString(ALT_EXCHANGE)); queue.setDeclareArgs((Map<String,Object>)xDeclareMap.get(ARGUMENTS)); } |
