MessageReference node, Subscription subscription){
try{
if(node!=null){
Message message=node.getMessage();
if(message!=null && node.getRegionDestination()!=null){
DeadLetterStrategy deadLetterStrategy=node
.getRegionDestination().getDeadLetterStrategy();
if(deadLetterStrategy!=null){
if(deadLetterStrategy.isSendToDeadLetterQueue(message)){
// message may be inflight to other subscriptions so do not modify
message = message.copy();
stampAsExpired(message);
message.setExpiration(0);
if(!message.isPersistent()){
message.setPersistent(true);
message.setProperty("originalDeliveryMode",
"NON_PERSISTENT");
}
// The original destination and transaction id do
// not get filled when the message is first sent,
// it is only populated if the message is routed to
// another destination like the DLQ
ActiveMQDestination deadLetterDestination=deadLetterStrategy
.getDeadLetterQueueFor(message, subscription);
if (context.getBroker()==null) {
context.setBroker(getRoot());
}
BrokerSupport.resendNoCopy(context,message,