The JavaDoc of a method is always a good source of information...
Why do you set the timeout to 0 seconds? It force Camel to interrupt the
shutdown immediately because it timed out. Try the stopRoute method without
a timeout (or at least only after a few seconds). On you shut down the
route from another thread. Otherwise there is at least one exchange in
flight...
And if you don't want a graceful shutdown (for whatever reason), provide
your own ShutdownStrategy [1].

[1] http://camel.apache.org/graceful-shutdown.html

Best,
Christian

On Fri, Nov 9, 2012 at 8:26 PM, Vishal Changrani <
vishal.changr...@ericsson.com> wrote:

> Hi,
>
> I am trying to shutdown a route by calling route.
> Camelcontext.stopRoute(routeId, 0, TimeUnit.SECONDS, false / true);
> //tried both true and false
>
> However the route continues to persist sometimes and I get the following
> messages..
>
> DEBUG - Route: Publisher_21 suspended and shutdown deferred, was consuming
> from:
> Endpoint[timer://TIMER_FOR_PUBLISHER?daemon=true&fixedRate=true&period=60000]
> INFO - Waiting as there are still 1 inflight and pending exchanges to
> complete, timeout in 0 seconds.
> INFO - Waiting as there are still 1 inflight and pending exchanges to
> complete, timeout in -1 seconds.
> ......
>
> (On the route orignally I had set .shutdownRoute(default);)
>
> I understand that the route may indeed be busy processing messages but I
> really know what I am doing and want to force it to stop.
>
> I read a few posts related to this issue but am still a little lost. I am
> running Camel 2.9.2 and is there no way that the route's process can be
> just interrupted ?
>
> Thanks,
> V
>
>
>
>


--

Reply via email to