Fixes failing ThreeBrokerVirtualTopicNetwork test associated /w AMQ-4296

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1483878 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2013-05-17 15:47:04 +00:00
parent d2d41805c5
commit b6703d6bd7
1 changed files with 12 additions and 0 deletions

View File

@ -255,6 +255,14 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P
}
}
}
// Remove topics that don't have subs..
for( (name, topic) <- topics.toArray ) {
if( topic.subscription_count == 0 ) {
removeTopicMessageStore(name)
}
}
debug("started")
}
@ -754,6 +762,10 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P
super.asyncAddQueueMessage(context, message, false)
}
def subscription_count = subscriptions.synchronized {
subscriptions.size
}
def gcPosition:Option[(Long, Long)] = {
var pos = lastSeq.get()
subscriptions.synchronized {