Components differ in how they deal with application errors.

For example, the HL7 codecs for camel-netty4 and camel-mina2 don’t interrogate 
HL7 acknowledgements so they don’t raise exceptions when an HL7 NACK is 
received - they just return the acknowledgement in the body.  Since I attempt 
to resend messages when I receive an HL7 AE NACK, I want an exception so I can 
use the onException stuff, and that was a little painful using the camel-hl7 
codecs.  So camel-mllp raises specific exceptions for the different types of 
HL7 NACKS, so I can use standard camel error handling more easily.  (BTW - this 
was one of reasons I wrote camel-mllp in the first place).

If I’m using HAPI to process the message, I still have the unmarshal call and 
an onException handler for the HAPI HL7Exception to deal with parse errors (and 
other HAPI errors)

Hope that helps

> On May 23, 2016, at 12:03 PM, sekaijin <[email protected]> wrote:
> 
> I understood that camel-mllp acquire the message.
> But my purpose is not there.
> I do not know camel-mllp
> what I mean is that usually when a component fails to perform its task, it
> throws an exception. I do not know once that puts an error message in the
> body.
> 
> I therefore think you should use an error handler or an 
> onCompletion.onFailure.
> 
> A+JYT
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/choice-when-not-working-as-expected-in-the-camel-route-tp5782452p5782978.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to