From c314d42848570748b339a71303a8de8288cc2923 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Wed, 3 Sep 2014 08:14:55 +0000 Subject: QPID-6066: [Java Client] 0-8..0-9-1 only - Add system property to allow call to exchange.bound during AMQSession#getQueueDepth to be omitted This prevents interoperabiliy problem with older Java Brokers, and gives users a change to restore old behaviour (AMQChannelException in the event that the queue does not exist) if desired. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622176 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/configuration/ClientProperties.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qpid/java/common/src/main') diff --git a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java index a767b078b1..b29e77f14d 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java @@ -270,6 +270,16 @@ public class ClientProperties public static final String ADDR_SYNTAX_SUPPORTED_IN_0_8 = "qpid.addr_syntax_supported"; public static final boolean DEFAULT_ADDR_SYNTAX_0_8_SUPPORT = true; + /** + * Before 0.30, when using AMQP 0-8..0-9-1 requesting queue depth (AMQSession#getQueueDepth) for a queue that + * did not exist resulted in AMQChannelException. From 0.30 forward, 0 is returned in common with 0-10 + * behaviour. + * + * Setting this system property true restores the old behaviour. It also avoids the isBound with a null exchange + * that causes an error in the Java Broker (0.28 and earlier). + */ + public static final String QPID_USE_LEGACY_GETQUEUEDEPTH_BEHAVIOUR = "qpid.use_legacy_getqueuedepth_behavior"; + private ClientProperties() { //No instances -- cgit v1.2.1