for (Iterator iter = ackList.iterator(); iter.hasNext();) {
DurableMessagePointer messagePointer = (DurableMessagePointer) iter.next();
ActiveMQMessage message = messagePointer.getMessage();
message.setJMSRedelivered(true);
if (message.incrementDeliveryCount() >= redeliveryPolicy.getMaximumRetryCount()) {
if (log.isDebugEnabled()){
log.debug("Message: " + message + " has exceeded its retry count");
}
// TODO: see if we can use the deadLetterPolicy of the container that dispatched the message.
deadLetterPolicy.sendToDeadLetter(message);