camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Mina:TCP MllpHl7 NACK and onComplete().OnFailed () howto ?
Date Tue, 08 May 2012 07:38:57 GMT
Hi

As mentioned on the on completion web page
http://camel.apache.org/oncompletion.html

Camel spins of a new and separate thread to process the on completion.
So its *extra* work that runs on the side of the original route. So
you should NOT use that to send back a ACK or NACK. That should be
computed and handled in your original route.

The on completion, can be used to trigger async log messages to be
send to a log central database, or fire out an email, or send a alert
to a snmp server, or something else.

We may wanna emphasize that better on the documentation page in the future.


On Sun, May 6, 2012 at 2:35 PM, sekaijin <jean-yves.terrien@sap.aphp.fr> wrote:
> Hi.
>
> how to manage the TCP acknowledgment with Camel.
>
> I have a route that receives via mina:TCP for HL7 message (MllpHl7Codec)
> when the route ends, the contents of the body is returned Socket as ACK.
> the route ends in the onComplete().onCompleteOnly()
>
> if an error occurs, whithout exception treatment, camel send the exception
> in the socket and causes an error.
> the route ends in the onComplete().onFailed()
>
> if I add a onException to catch the error. I can place a NACK in the body
> and clear the error
> the NACK is then sent into the socket but the route ends in the
> onComplete().onCompleteOnly().
> This makes sense because I have removed the error of the exchange.
>
> How to Return a NACK and finish the route in the onComplete().OnFailed()?
>
> Thank you.
> A+JYT
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Mina-TCP-MllpHl7-NACK-and-onComplete-OnFailed-howto-tp5689190.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message