You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2017/11/08 18:15:53 UTC
qpid-broker-j git commit: QPID-8025 : [Java Broker] Improve detach
error message on unsubscribing from JMS shared subs
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 3943978d0 -> e3aa40d97
QPID-8025 : [Java Broker] Improve detach error message on unsubscribing from JMS shared subs
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/e3aa40d9
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/e3aa40d9
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/e3aa40d9
Branch: refs/heads/master
Commit: e3aa40d97b8b79b9a7540d5055930c7a525c48d1
Parents: 3943978
Author: rgodfrey <rg...@apache.org>
Authored: Wed Nov 8 19:15:29 2017 +0100
Committer: rgodfrey <rg...@apache.org>
Committed: Wed Nov 8 19:15:29 2017 +0100
----------------------------------------------------------------------
.../server/protocol/v1_0/SendingLinkEndpoint.java | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/e3aa40d9/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
index 9c783b8..23df75e 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
@@ -842,7 +842,23 @@ public class SendingLinkEndpoint extends AbstractLinkEndpoint<Source, Target>
}
catch (IllegalStateException e)
{
- closingError = new Error(AmqpError.RESOURCE_LOCKED, e.getMessage());
+ String message;
+ if(sourceCapabilities.contains(Session_1_0.SHARED_CAPABILITY)
+ && sourceCapabilities.contains(ExchangeSendingDestination.TOPIC_CAPABILITY))
+ {
+ String subscriptionName = getLinkName();
+ int separator = subscriptionName.indexOf("|");
+ if (separator > 0)
+ {
+ subscriptionName = subscriptionName.substring(0, separator);
+ }
+ message = "There are active consumers on the shared subscription '"+subscriptionName+"'";
+ }
+ else
+ {
+ message = e.getMessage();
+ }
+ closingError = new Error(AmqpError.RESOURCE_LOCKED, message);
}
catch (NotFoundException e)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org