camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garry <>
Subject RE: Do error handling on JBI MessageExchange status?
Date Tue, 12 Aug 2008 12:59:39 GMT

Hi Claus,

Thanks for the suggestions. I didn't see the interceptor integrating
with the DLC and the DLC has the nice retry semantics I want. If I'm
wrong about that, please let me know.  The wrapper approach is workable
and involves a small amount of code but I'm trying to use Camel constructs
only and write as little code as possible myself.

Perhaps you can take a quick look at the JBI specification which has two or 
three pages describing the four MEPs that JBI implementations are required 
to support? In ServiceMix, 'MessageExchange.status' is the implementation 
of the status exchanged by producers and consumers as outlined in the MEPs. 
When using Camel to wire JBI endpoints, it would be great if Camel error 
handling understood the ServiceMix MessageExchange status.  Does that make

Thanks again, Garry

Claus Ibsen wrote:
> 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.
> 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:
> -----Original Message-----
> From: Garry [] 
> Sent: 11. august 2008 23:26
> To:
> 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:
> Sent from the Camel - Users mailing list archive at

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

View raw message