Hello experts,

I have a route consuming from file endpoint and then other routes chained
downstream using direct:.

When I get a particular kind of exception, I want to be able to suspend the
CamelContext (camelContext.suspend). And then be able to resume the Context
from JMX. 

Now, what happens is that as soon as I issue "suspend context" from the
code, it goes through the defaultShutDownStrategy and logs these messages
for 300 seconds (expected).

*INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.523 Waiting
as there are still 5 inflight and pending exchanges to complete, timeout in
43 seconds.*

Not sure why the 5 inflight exchanges are not getting flushed out, but
eventually, times out and suspends the route. 

WARN.org.apache.camel.impl.DefaultShutdownStrategy:
*org.apache.camel.impl.DefaultShutdownStrategy.doShutdown.191 Timeout
occurred. Now forcing the routes to be shutdown now.
WARN.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.531
Interrupted while waiting during graceful shutdown, will force shutdown
now.*
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
*route-psp1* suspend complete, was consuming from:*
Endpoint[file:///h/apps/proj/input?maxMessagesPerPoll=1&noop=false&readLock=changed*]
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
route-psp2 suspend complete, was consuming from: Endpoint[direct://csv]
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy.doShutdown.213 Graceful
shutdown of 6 routes completed in 300 seconds
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
route-psp3 suspend complete, was consuming from:
Endpoint[direct://thousands]
INFO.org.apache.camel.spring.SpringCamelContext:
org.apache.camel.impl.DefaultCamelContext.doSuspend.1353 Apache Camel 2.10.3
(CamelContext: rdlCamelContext) is suspended in 5 minutes
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
route-psp4 suspend complete, was consuming from: Endpoint[direct://update]
INFO.com.paypal.demandgen.rdl.RdlContextController:
com.paypal.demandgen.rdl.RdlContextController.suspend.33 Context suspended
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
route-psp5 suspend complete, was consuming from:
Endpoint[direct://stopRoute]
INFO.org.apache.camel.impl.DefaultShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run.556 Route:
route-psp6 suspend complete, was consuming from:
Endpoint[direct://suspendContext]


Even after I resume the context using JMX, my route-psp1 refuses to pick up
files from the input endpoint location.

Can somebody advice me as to what I am doing wrong? I am using Camel 2.10.3.

Thanks in advance
Rajesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/CamelContext-resume-does-not-reactivate-the-route-tp5728862.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to