Hi

To my knowledge the DLC doesn't test for conditions of status = 
ExchangeStatus.ERROR.

Is this flag JBI specific? Camel doesn't have a set/getStatus on its Exchange?

What Camel has instead is:
- exception
- fault

What you could do is to wrap this in a processor/bean and do the "logic" and 
convert the ERROR status to a fault message or throw an exception. Then the DLC 
should kick in.

And I even think you can wrap this in an interceptor.
http://activemq.apache.org/camel/dsl.html


But when it comes to the end I think it would be better to improve Camel with 
whatever this ExchangeStatus.ERROR JBI thing is and let is DLC be aware of this 
one.

So Gray can you tell more about this ExchangeStatus.ERROR? And what are your 
thoughts?


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Garry [mailto:[EMAIL PROTECTED] 
Sent: 11. august 2008 23:26
To: [email protected]
Subject: Do error handling on JBI MessageExchange status?


Hi,

Here's a short configuration involving two JBI endpoints:

  errorHandler(deadLetterChannel(...));

  from("jbi:endpoint:http//first/jbi/endpoint")
  .to ("jbi:endpoint:http//second/jbi/endpoint");

If the second JBI endpoint sets the MessageExchange status to
error (and throws no exception):

  exchange.setStatus(ExchangeStatus.ERROR);

I'd like my deadLetterChannel error handler to "fire",
resending the message to the second JBI endpoint per the
configured retry parameters.  I don't get that behavior
now; the route completes normally.

How can I trigger error handling on JBI exchange errors?
I did mess around some with predicates (to inspect the returned
exchange status) but couldn't figure out how to combine
a predicate with a DLC. Any ideas?  Examples?

Thanks, Garry
-- 
View this message in context: 
http://www.nabble.com/Do-error-handling-on-JBI-MessageExchange-status--tp18934212s22882p18934212.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to