https://issues.apache.org/jira/browse/AMQ-4000 - tracking subscription commands causes a problem with replay outside of activate - can reset a sub ack locations - regression in AMQ2149Test. Fixed by ignoring sub add during recovery replay

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1511306 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2013-08-07 13:38:53 +00:00
parent 805d88af24
commit 0061f6f755
1 changed files with 8 additions and 0 deletions

View File

@ -1014,6 +1014,14 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
*/
void process(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException {
if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) {
if (data instanceof KahaSubscriptionCommand) {
KahaSubscriptionCommand kahaSubscriptionCommand = (KahaSubscriptionCommand)data;
if (kahaSubscriptionCommand.hasSubscriptionInfo()) {
// needs to be processed via activate and will be replayed on reconnect
LOG.debug("ignoring add sub command during recovery replay:" + data);
return;
}
}
process(data, location, (Runnable) null, (Runnable) null);
} else {
// just recover producer audit