Hi Garry

Glad its working.

However I am wondering what you have done to fix it? Can you show some code?
I am wondering if you have a custom solution to bridge Camel and ServiceMix to 
handle this ERROR status. What I would like is to be able to fix it in the 
standard distributions of Camel and ServiceMix. I have committers standby that 
would like to help, but need a sample app to work with.

So Garry can you help?


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 18:31
To: [email protected]
Subject: RE: Do error handling on JBI MessageExchange status?


Hi Claus,

Well, it's a good thing you asked for an example. In putting one together, I
found
that if method javax.jbi.messaging.MessageExchange.setError is called to set
an
error exception - in addition to setting the ME status to ERROR - then the
DLC error
handler *is* invoked. Previously, I was setting 'ME.status = ERROR' alone
but believe
now the correct protocol is to also set an error exception. In fact, just
setting an
error exception automatically flips the ME status to ERROR. Camel DLC is
working as 
desired across JBI endpoints on both exceptions and MEP status errors. Very
cool!

Thanks, Garry




Claus Ibsen wrote:
> 
> Hi Garry
> 
> Good news. I got the attention from the ServiceMix core developers. They
> would like to help out and implement a fix in camel-jbi so we can support
> your use-case.
> 
> However they would like a small sample app to work with during
> development. Can you create a small sample and attach it as a .zip or
> something?
> 
> 
> 
> 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.
> 
> 
> 

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

Reply via email to