mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2985 - fix npe on remove consumer track new consumer last ack at lowest priority such that there can be no replay
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1038643 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d6ad7c7cd0
commit
aec047d08b
|
@ -784,6 +784,10 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter {
|
|||
MessageOrderCursor moc = sd.subscriptionCursors.get(subscriptionKey);
|
||||
if (moc == null) {
|
||||
LastAck pos = sd.subscriptionAcks.get(tx, subscriptionKey);
|
||||
if (pos == null) {
|
||||
// sub deleted
|
||||
return;
|
||||
}
|
||||
sd.orderIndex.setBatch(tx, pos);
|
||||
moc = sd.orderIndex.cursor;
|
||||
} else {
|
||||
|
|
|
@ -1314,7 +1314,7 @@ public class MessageDatabase extends ServiceSupport implements BrokerServiceAwar
|
|||
|
||||
public LastAck(long ackLocation) {
|
||||
this.lastAckedSequence = ackLocation;
|
||||
this.priority = MessageOrderIndex.HI;
|
||||
this.priority = MessageOrderIndex.LO;
|
||||
}
|
||||
|
||||
public LastAck(long ackLocation, byte priority) {
|
||||
|
|
Loading…
Reference in New Issue