mirror of https://github.com/apache/activemq.git
[AMQ-7314] Fix counter increment when lastDelivereSeqId > BrokerSequenceId
This commit is contained in:
parent
0d0131496a
commit
df1750fe01
|
@ -541,11 +541,11 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
|
||||||
// locate last redelivered in unconsumed list (list in delivery rather than seq order)
|
// locate last redelivered in unconsumed list (list in delivery rather than seq order)
|
||||||
if (lastDeliveredSequenceId > RemoveInfo.LAST_DELIVERED_UNSET) {
|
if (lastDeliveredSequenceId > RemoveInfo.LAST_DELIVERED_UNSET) {
|
||||||
for (MessageReference ref : unAckedMessages) {
|
for (MessageReference ref : unAckedMessages) {
|
||||||
if (ref.getMessageId().getBrokerSequenceId() == lastDeliveredSequenceId) {
|
LOG.debug("UnAck reference message id: {}, reference message broker sequence id: {}", ref.getMessageId(), ref.getMessageId().getBrokerSequenceId());
|
||||||
|
if (lastDeliveredSequenceId == 0 || (lastDeliveredSequenceId > 0 && ref.getMessageId().getBrokerSequenceId() <= lastDeliveredSequenceId)) {
|
||||||
lastDeliveredRef = ref;
|
lastDeliveredRef = ref;
|
||||||
markAsRedelivered = true;
|
markAsRedelivered = true;
|
||||||
LOG.debug("found lastDeliveredSeqID: {}, message reference: {}", lastDeliveredSequenceId, ref.getMessageId());
|
LOG.debug("found lastDeliveredSeqID: {}, message reference: {}", lastDeliveredSequenceId, ref.getMessageId());
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue