Sending Messages to the DLQ in JBossESB 4.7
The page 65 of the Programmers Guide says that if you are trying to deliver the message (…) it will send the message to the DeadLetterService, but doesn’t say how to do so.
import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.message.Message;
public static final DQLSampleAction extends AbstractActionPipelineProcessor {
private static final EPR DLQ_EPR = new LogicalEPR(ServiceInvoker.INTERNAL_SERVICE_CATEGORY, ServiceInvoker.DEAD_LETTER_SERVICE_NAME);
public Message process(final Message msg) {
msg.getHeader().getCall().setReplyTo(DLQ_EPR);
return msg;
}
}
Advertisement