camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: deadLetterChannel and Camel 1.6.1
Date Wed, 01 Jul 2009 04:35:04 GMT
On Tue, Jun 30, 2009 at 6:50 PM, ybrown<> wrote:
> Here is my RouteBuilder
>    RouteBuilder builder = new RouteBuilder() {
>            public void configure() {
>                errorHandler(deadLetterChannel("mock:error").onRedelivery(new
> RedeliverProcessor()).initialRedeliveryDelay(redeliveryDelay).maximumRedeliveries(maximumRedeliveries));
>                Integer delay = config.getEmailPullDelay();
>                StringBuffer url = new StringBuffer(config.getEmailServerURL()
> + "?password=" + config.getEmailUserPassword() +
> "&deleteProcessedMessages=true");
>                from(url.toString()).process(new MailProcessor(_secSession));
>            }
>        };
> What I'd like to do instead, is the following:
> Instead of using onRedelivery()
> I'd like to have something that will handle a messages that got sent to
> deadLetterChannel.
> Specifically, I want all messages that failed, sent to another email
> address.
> Is it possible in Camel 1.6.1? and if yes, what is the best way of
> implementing it?
> I tired using "impas://" instead of "mock:error"
> errorHandler(deadLetterChannel("imaps://"))  and
> although I didn't get any errors in the log, I didn't get any emails either.
> Any suggestions?

Well that should be it. Just set the endpoint of choice in dead letter
channel and it will be used as destination when an message failed.
To make it a bit easier you can a direct endpoint to direct it to
another route where you can do a bit logging and emailing



Then you should set it logged and then its just the last part. Sending
the failed email that might be an issue.

Are you sending to the same mail server / account as you read? Maybe
that can be an issue as you already hold a mail session when reading.
Maybe try with another user account so its not the same that reads and
sends the failed mail.

> Yuliya
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Open Source Integration:

View raw message