git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@663980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-06-06 15:21:17 +00:00
parent 60d4d48fbf
commit efecce6f6e
1 changed files with 7 additions and 3 deletions

View File

@ -353,9 +353,13 @@ public abstract class AbstractRegion implements Region {
if (sub == null) {
//networked subscriptions are going to acknowledge in flight messages
//on behalf a subscription that is no more ...
if (!consumerExchange.getConnectionContext().isNetworkConnection()) {
throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId());
}else {
if (!consumerExchange.getConnectionContext().isNetworkConnection()
&& !consumerExchange.getConnectionContext()
.isInRecoveryMode()) {
throw new IllegalArgumentException(
"The subscription does not exist: "
+ ack.getConsumerId());
} else {
return;
}
}