On 06/12/2007, Cecil Williams <[EMAIL PROTECTED]> wrote:
>
> Can you have multiple error handlers in a route builder?
Sure!
You can have an error handler used by default for a number of routing
rules; then customize the error handler inside a route - or switch it
between routes etc.
> We would like to
> use the DeadLetterChannel and LoggingErrorHandler at the same time so that
> we log a message that an exception occurred and then route the message to an
> error queue.
You could always write your own error handler if you like; though this
requirement seems like it should be possible to use the out of the box
DeadLetterChannel. i.e. we should probably patch the DeadLetterChannel
to log errors before sending it to the dead letter queue (folks can
always disable the logging).
Another option could be to use an endpoint called "direct:deadLetter"
as your dead letter endpoint then have a routing rules as...
from("direct:deadLetter").to("log:DeadLetterChanel?level=ERROR",
"activemq:MyDeadLetterQueue");
Which would allow you to do content based routing of the error etc
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com