else {
long startIndex = endRank - num;
if (startIndex < 0 ){
startIndex = 0;
}
Set <Tuple> memIdWithScores = jedis.zrangeWithScores(key, startIndex, endRank);
long expiredTime = System.currentTimeMillis() - retention * 1000L;
for (Tuple t: memIdWithScores) {
if (t.getScore() < expiredTime || t.getElement().equals(nextReceiptHandle)) {
continue;
} else {