summaryrefslogtreecommitdiff
path: root/java/client/src
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-09-03 08:14:55 +0000
committerKeith Wall <kwall@apache.org>2014-09-03 08:14:55 +0000
commit01da1adfc66dc5aa5651cd09c85f0be8d222c721 (patch)
tree18e561a09cc927d9c6d6e303115f773762981095 /java/client/src
parent2299034f001bdc67510d0d1e8b0f55a977a53d19 (diff)
downloadqpid-python-01da1adfc66dc5aa5651cd09c85f0be8d222c721.tar.gz
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/qpid@1622176 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java
index 31df674a09..f3db245e45 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java
@@ -58,6 +58,7 @@ import org.apache.qpid.client.state.AMQState;
import org.apache.qpid.client.state.AMQStateManager;
import org.apache.qpid.client.state.listener.SpecificMethodFrameListener;
import org.apache.qpid.common.AMQPFilterTypes;
+import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.framing.*;
import org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9;
import org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91;
@@ -77,6 +78,9 @@ public class AMQSession_0_8 extends AMQSession<BasicMessageConsumer_0_8, BasicMe
private final boolean _syncAfterClientAck =
Boolean.parseBoolean(System.getProperty(QPID_SYNC_AFTER_CLIENT_ACK, "true"));
+ private final boolean _useLegacyQueueDepthBehaviour =
+ Boolean.parseBoolean(System.getProperty(ClientProperties.QPID_USE_LEGACY_GETQUEUEDEPTH_BEHAVIOUR, "false"));
+
/**
* The period to wait while flow controlled before sending a log message confirming that the session is still
* waiting on flow control being revoked
@@ -878,7 +882,8 @@ public class AMQSession_0_8 extends AMQSession<BasicMessageConsumer_0_8, BasicMe
protected Long requestQueueDepth(AMQDestination amqd, boolean sync) throws AMQException, FailoverException
{
- if(isBound(null, amqd.getAMQQueueName(), null))
+
+ if(_useLegacyQueueDepthBehaviour || isBound(null, amqd.getAMQQueueName(), null))
{
AMQFrame queueDeclare =
getMethodRegistry().createQueueDeclareBody(getTicket(),