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: Inflight and pending exchange in a route during shutdown
Date Wed, 01 Jun 2011 16:37:28 GMT
On Wed, Jun 1, 2011 at 5:01 PM, Xavier Coulon <xcoulon@gmail.com> wrote:
> Hello,
>
> I'm having an issue with the File Component in my test case. Running a test
> from within Eclipse works fine, running the exact same test with Maven fails
> because of a timeout I set on the test method.
>

What do you mean by timeout I set on the test method?

And what version of Camel are you using?

And how do you run it from Maven? And from Eclipse?

And what does your route do.



> On the Eclipse side, during the route with a file endpoint is shutdown with
> the following messages:
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy:suspendNow]
> Suspending: Consumer[file://D:/tmp/integration]
> [16:12:06,735][TRACE][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.util.ServiceHelper:suspendService] Suspending
> service Consumer[file://D:/tmp/integration]
> [16:12:06,735][DEBUG][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy:suspendNow]
> Suspend complete for: Consumer[file://D:/tmp/integration]
> [16:12:06,735][ INFO][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileValidation suspended and shutdown deferred,
> was consuming from: Endpoint[file://D:/tmp/integration]
> [16:12:06,735][DEBUG][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.xml.aggregation preparing to shutdown.
> [16:12:06,735][ INFO][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.xml.aggregation preparing to shutdown complete.
> [16:12:06,735][DEBUG][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileSplitting preparing to shutdown.
> [16:12:07,157][TRACE][Camel (context1) thread #6 -
> file://D:/tmp/integration][org.apache.camel.impl.ScheduledPollConsumer:run]
> Cannot start to poll: Endpoint[file://D:/tmp/integration] as its suspended
> [16:12:07,251][ INFO][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileSplitting preparing to shutdown complete.
> [16:12:07,251][DEBUG][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileValidation preparing to shutdown.
> [16:12:07,251][ INFO][Camel (context1) thread #18 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileValidation preparing to shutdown complete.
> [16:12:07,251][TRACE][Camel (context1) thread #18
>
> With Maven, I have the following messages:
> [16:16:01,670][TRACE][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Shutting down route: stock.route.phase1.fileValidation with options
> [Default,CompleteCurrentTaskOnly]
> [16:16:01,670][TRACE][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy:suspendNow]
> Suspending: Consumer[file://D:/tmp/integration]
> [16:16:01,670][TRACE][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.util.ServiceHelper:suspendService] Suspending
> service Consumer[file://D:/tmp/integration]
> [16:16:01,670][DEBUG][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy:suspendNow]
> Suspend complete for: Consumer[file://D:/tmp/integration]
> [16:16:01,670][ INFO][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Route: stock.route.phase1.fileValidation suspended and shutdown deferred,
> was consuming from: Endpoint[file://D:/tmp/integration]
> [16:16:01,670][DEBUG][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> 1 inflight and pending exchanges for consumer:
> Consumer[file://D:/tmp/integration]
> [16:16:01,670][ INFO][Camel (context1) thread #19 -
> ShutdownTask][org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask:run]
> Waiting as there are still 1 inflight and pending exchanges to complete,
> timeout in 300 seconds.
>
> and this lasts for 300s, until the shutdown is forced..
>
> The weird thing is that there should be only one exchange in this route, and
> it was processed in other routes after this one...
>
> I don't know if it's related to the way tests are run with Maven, but is
> there anything I could add to get rid of the stuck inflight exchange ?
>
> Thank you in advance
> Regards,
> --
> Xavier
>



-- 
Claus Ibsen
-----------------
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