java - Camel process do not shutdown because of (not existing) inflight exchanges -
i've camel process (that run command line) route similar one:
public class profilerroute extends routebuilder { @override public void configure() { from("kestrel://my_queue?concurrentconsumers=10&waittimems=500") .unmarshal().json(jsonlibrary.jackson, myclass.class) .process(new processor() { @override public void process(exchange exchange) throws exception { /* real processing [...] */ exchange.getin().setbody(null); } }) .filter(body().isnotnull()) .to("file://nowhere"); } }
note i'm trashing whatever message after having processed it, being pure consumer process.
the process run own. no other process writing on queue, queue empty. when try kill process process not going die.
from logs see following lines (indented readability):
[ thread-1] mainsupport$hangupinterceptor info received hang - stopping main instance. [ thread-1] mainsupport info apache camel stopping [ thread-1] guicecamelcontext info apache camel 2.11.1 (camelcontext: camel-1) shutting down [ thread-1] defaultshutdownstrategy info starting graceful shutdown 1 routes (timeout 300 seconds) [l-1) thread #12 - shutdowntask] defaultshutdownstrategy info waiting there still 10 inflight , pending exchanges complete, timeout in 300 seconds.
and on decreasing timeout. @ end of timeout on logs:
[l-1) thread #12 - shutdowntask] defaultshutdownstrategy info waiting there still 10 inflight , pending exchanges complete, timeout in 1 seconds. [ thread-1] defaultshutdownstrategy warn timeout occurred. forcing routes shutdown now. [l-1) thread #12 - shutdowntask] defaultshutdownstrategy warn interrupted while waiting during graceful shutdown, force shutdown now. [ thread-1] kestrelconsumer info stopping consumer kestrel://localhost:22133/my_queue?concurrentconsumers=10&waittimems=500
but process not die anyway (even if try kill @ point).
i have expected after waiting time threads realise shutdown going on , stop.
i've read "graceful shutdown" document, not find explains behaviour i'm facing.
as can see logs i'm using 2.11.1 version of apache camel.
update: according claus ibsen might problem of camel-kestrel component. filed issue on asf jira camel: camel-6632
this bug in camel-kestrel, , jira ticket has been logged fix this: https://issues.apache.org/jira/browse/camel-6632
Comments
Post a Comment