mirror of https://github.com/apache/activemq.git
added better exception message
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db9144a985
commit
900f6e9de1
|
@ -66,12 +66,14 @@ public class TopicRegion extends AbstractRegion {
|
||||||
lookup(context, destination);
|
lookup(context, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubcriptionName());
|
String clientId = context.getClientId();
|
||||||
|
String subcriptionName = info.getSubcriptionName();
|
||||||
|
SubscriptionKey key = new SubscriptionKey(clientId, subcriptionName);
|
||||||
DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key);
|
DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key);
|
||||||
if (sub != null) {
|
if (sub != null) {
|
||||||
|
|
||||||
if (sub.isActive()) {
|
if (sub.isActive()) {
|
||||||
throw new JMSException("Durable consumer is in use");
|
throw new JMSException("Durable consumer is in use for client: " + clientId + " and subscriptionName: " + subcriptionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Has the selector changed??
|
// Has the selector changed??
|
||||||
|
|
Loading…
Reference in New Issue