diff options
| author | Keith Wall <kwall@apache.org> | 2014-09-05 16:04:34 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-09-05 16:04:34 +0000 |
| commit | b32805028ccffd85a7c6149d32190a449816d851 (patch) | |
| tree | 274b9ec9f0861565d613dc2198279cb37c0a7741 /qpid/java/client | |
| parent | aa9a8e6e242054d4a835bde7f6e2a286397ec390 (diff) | |
| download | qpid-python-b32805028ccffd85a7c6149d32190a449816d851.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.
Merged from trunk with command:
svn merge -c 1622176 https://svn.apache.org/repos/asf/qpid/trunk/qpid
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.30@1622730 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -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 fbf8b27630..2bc614e163 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 @@ -868,7 +872,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(), |
