Simples Assim

Sending Messages to the DLQ in JBossESB 4.7

leave a comment »

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

Written by Fernando Ribeiro

January 25, 2010 at 12:00 am

Posted in Software

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 781 other followers