mirror of https://github.com/apache/activemq.git
Updated durable related error messages in TopicRegion to include both subscriptionName and clientId.
This resolves https://issues.apache.org/jira/browse/AMQ-5719
This commit is contained in:
parent
ec9a92f6fc
commit
72837960cf
|
@ -200,7 +200,8 @@ public class TopicRegion extends AbstractRegion {
|
||||||
SubscriptionKey key = new SubscriptionKey(info.getClientId(), info.getSubscriptionName());
|
SubscriptionKey key = new SubscriptionKey(info.getClientId(), info.getSubscriptionName());
|
||||||
DurableTopicSubscription sub = durableSubscriptions.get(key);
|
DurableTopicSubscription sub = durableSubscriptions.get(key);
|
||||||
if (sub == null) {
|
if (sub == null) {
|
||||||
throw new InvalidDestinationException("No durable subscription exists for: " + info.getSubscriptionName());
|
throw new InvalidDestinationException("No durable subscription exists for clientID: "
|
||||||
|
+ info.getClientId() + " and subscriptionName: " + info.getSubscriptionName());
|
||||||
}
|
}
|
||||||
if (sub.isActive()) {
|
if (sub.isActive()) {
|
||||||
throw new JMSException("Durable consumer is in use");
|
throw new JMSException("Durable consumer is in use");
|
||||||
|
@ -336,7 +337,9 @@ public class TopicRegion extends AbstractRegion {
|
||||||
}
|
}
|
||||||
durableSubscriptions.put(key, sub);
|
durableSubscriptions.put(key, sub);
|
||||||
} else {
|
} else {
|
||||||
throw new JMSException("That durable subscription is already active.");
|
throw new JMSException("Durable subscription is already active for clientID: "
|
||||||
|
+ context.getClientId() + " and subscriptionName: "
|
||||||
|
+ info.getSubscriptionName());
|
||||||
}
|
}
|
||||||
return sub;
|
return sub;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue