Hi Gary Yes it makes sence. We have an entire JBI expert team with our brothers in Apache ServiceMix. I will try to get their attention on this matter so we can have it sorted in Camel.
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: 12. august 2008 15:00 To: [email protected] Subject: RE: Do error handling on JBI MessageExchange status? 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 sense? 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. > 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. > > > -- View this message in context: http://www.nabble.com/Do-error-handling-on-JBI-MessageExchange-status--tp18934212s22882p18943834.html Sent from the Camel - Users mailing list archive at Nabble.com.
