diff options
| author | Keith Wall <kwall@apache.org> | 2014-09-03 08:14:55 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-09-03 08:14:55 +0000 |
| commit | c314d42848570748b339a71303a8de8288cc2923 (patch) | |
| tree | cfc29a4e84d7c1371735136b10d9b39d44db51ab /qpid/java/client/src | |
| parent | d67b476dcb97b16e784d0008f5c641132969ed51 (diff) | |
| download | qpid-python-c314d42848570748b339a71303a8de8288cc2923.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@1622176 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java index 31df674a09..f3db245e45 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java +++ b/qpid/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(), |
