You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jey350 <je...@hotmail.com> on 2014/05/23 11:09:13 UTC

Camel gracefull shutdown with exec:

Hello,

I have an issue with a gracefull shutdown of a route containing an exec
command, because the route is stopped after the exe command and what follows
is not processed.

With a sample it will be esasier to undersand:

<route>
  <process ref="process1"/>
  <to uri="exec:mycommand/>
  <process ref="process2"/>
</route>

If the shutdown command is launched while process1, the exec will run but
not process2.

I can precise the timeout is not reached, with a to:direct trick it's the
same, and I'm using Camel 2.10.

Any idea to let the route finish while shutdown ?

Thanks.








--
View this message in context: http://camel.465427.n5.nabble.com/Camel-gracefull-shutdown-with-exec-tp5751510.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel gracefull shutdown with exec:

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, May 26, 2014 at 10:15 AM, Jey350 <je...@hotmail.com> wrote:
> Hello Claus,
>
> Do you need anything else to have a more precise idea of my issue ?
> Otherwise, do you have advice to make a workaround ?
>

I dont know what is the problem. You have provided limited
information. Also as you have the issue, its better you dive in and
see what the problem is.

You can try to take out parts of your Camel route to see if that makes
a difference, eg take out the exec, or some of the processors. Or
maybe its another route causing something?

And try using a newer release of Camel etc.

Help on this community is volunteer based.
If you look for priority help, then there is companies offering that
http://camel.apache.org/commercial-camel-offerings.html


> Thanks.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-gracefull-shutdown-with-exec-tp5751510p5751578.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Camel gracefull shutdown with exec:

Posted by Jey350 <je...@hotmail.com>.
Hello Claus,

Do you need anything else to have a more precise idea of my issue ?
Otherwise, do you have advice to make a workaround ?

Thanks.




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-gracefull-shutdown-with-exec-tp5751510p5751578.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel gracefull shutdown with exec:

Posted by Jey350 <je...@hotmail.com>.
Hello Claus,

The problem is that the route is shut down before the timeout.
It's seems to me that Camel thinks route is finished after running the exec,
despite there is still some task to do in the route.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-gracefull-shutdown-with-exec-tp5751510p5751516.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel gracefull shutdown with exec:

Posted by Claus Ibsen <cl...@gmail.com>.
You can use a higher graceful timeout if you must wait for the exec to
complete and process its message.
http://camel.apache.org/graceful-shutdown.html

Though the default timeout is 300 seconds, so your exec must take a long time.
Mind that from unit tests the timeout is set to 10 sec instead.


On Fri, May 23, 2014 at 11:09 AM, Jey350 <je...@hotmail.com> wrote:
> Hello,
>
> I have an issue with a gracefull shutdown of a route containing an exec
> command, because the route is stopped after the exe command and what follows
> is not processed.
>
> With a sample it will be esasier to undersand:
>
> <route>
>   <process ref="process1"/>
>   <to uri="exec:mycommand/>
>   <process ref="process2"/>
> </route>
>
> If the shutdown command is launched while process1, the exec will run but
> not process2.
>
> I can precise the timeout is not reached, with a to:direct trick it's the
> same, and I'm using Camel 2.10.
>
> Any idea to let the route finish while shutdown ?
>
> Thanks.
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-gracefull-shutdown-with-exec-tp5751510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/