https://issues.apache.org/jira/browse/AMQ-3362 - check expired messages only for inactive durable subs

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1138925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-06-23 15:24:14 +00:00
parent 984a9fb1c3
commit b78867e183
1 changed files with 4 additions and 2 deletions

View File

@ -539,10 +539,12 @@ public class Topic extends BaseDestination implements Task {
topicStore.recover(new MessageRecoveryListener() { topicStore.recover(new MessageRecoveryListener() {
public boolean recoverMessage(Message message) throws Exception { public boolean recoverMessage(Message message) throws Exception {
if (message.isExpired()) { if (message.isExpired()) {
for (Subscription sub : durableSubcribers.values()) { for (DurableTopicSubscription sub : durableSubcribers.values()) {
if (!sub.isActive()) {
messageExpired(connectionContext, sub, message); messageExpired(connectionContext, sub, message);
} }
} }
}
result.add(message); result.add(message);
return true; return true;
} }