This commit is contained in:
Clebert Suconic 2017-11-30 09:59:35 -05:00
commit d498cf4cc6
2 changed files with 7 additions and 1 deletions

View File

@ -2454,7 +2454,12 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
postOffice.route(copyMessage, tx, false, rejectDuplicate);
acknowledge(tx, ref);
if (expiry) {
acknowledge(tx, ref, AckReason.EXPIRED);
} else {
acknowledge(tx, ref);
}
}
@SuppressWarnings({"ArrayToString", "ArrayToStringConcatenation"})

View File

@ -163,6 +163,7 @@ public class ExpiryRunnerTest extends ActiveMQTestBase {
Assert.assertNotNull(cm);
// assertEquals("m" + i, cm.getBody().getString());
}
Assert.assertEquals(100, ((Queue) server.getPostOffice().getBinding(qName).getBindable()).getMessagesExpired());
consumer.close();
}