}
protected void replayTransientConsumedRedeliveredMessages(ActiveMQSession session,ActiveMQMessageConsumer consumer) throws JMSException{
if (consumer.getDestination().isTopic() && !transientConsumedRedeliverCache.isEmpty()){
Filter filter = getFilterFactory().createFilter(consumer.getDestination(), consumer.getMessageSelector());
if (consumer.isNoLocal()) {
filter = new AndFilter(filter, new NoLocalFilter(clientID));
}
for (Iterator i = transientConsumedRedeliverCache.iterator(); i.hasNext();){
ActiveMQMessage message = (ActiveMQMessage)i.next();
if (filter.matches(message)){
transientConsumedRedeliverCache.remove(message);
message.setMessageAcknowledge(session);
message.setJMSRedelivered(true);
message.setConsumerNos(new int[]{consumer.getConsumerNumber()});
consumer.processMessage(message);