camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject context.stopRoute() API hangs periodically
Date Wed, 06 Jan 2010 17:43:56 GMT

I'm using Camel 2.1 on SMX 3.3.1.  I'm using a timer to periodically
reprocess messages that I've sent to an error queue.  While reprocessing I
want to stop the main message processing route as follows (for some specific
client requirements)...


.bean(blockedNodeManager, "processBlockedQueue");

then, in blockedNodeManager stops the route, acts as a polling consumer and
then restarts the route...

ServiceStatus routeStatus = context.getRouteStatus("mainRoute");
{"stopping route..." + routeId);
	context.stopRoute(routeId);"route stopped..." + routeId);

while (true) 
    String msg = consumer.receiveBody("activemq:errorQueue", 100,
    if (msg == null)
    producer.sendBody("direct:main", msg);    

routeStatus = context.getRouteStatus("mainRoute");
{"starting route..." + routeId);
    context.startRoute(routeId);"route started..." + routeId);

This seems to work fine for a while (up to 12 hours sometimes), but will
periodically hang while trying to stop the main route.  The last message I
see in my log file is...."stopping route mainRoute" never reaches the
"route stopped" debug statement.  At this point, I'm hosed...I can't even
use JMX to restart the route.  I restart the server and all works fine again
(for a while)...

Am I using these APIs incorrectly?  If there is a better way to accomplish
this, let me know...

thanks in advance...

Ben - Senior Consultant
using SMX 3.3.1/Camel 2.1
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message