activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oseymen <>
Subject Camel route stop when messages inflight
Date Fri, 19 Aug 2011 16:57:20 GMT

I am having problems stopping a camel route which pushes messages from a
queue in broker1 to another queue in broker2. I am using Apache Camel
2.7.1-fuse-00-27 that ships with ActiveMQ 5.5.0-fuse-00-27.

The problem comes when there are inflight messages. This happens if broker2
is offline (because of  maintenance or networking problems). When I click on
stop button for the route in broker1 when broker2 is unreachable, I can see
PooledConnectionFactory still trying to connect to broker2 even after I get
"Route: route1 shutdown complete" in the log file.

I've setup DefaultShutdownStrategy for camel to wait inflight operations for
10 seconds and shutdown. After 10 seconds Camel emits "Route route1 shutdown
complete" message but immediately after that line I can see
PooledConnectionFactory repeating (indefinitely):

Still waiting for shutdown of 16 message listener invokers |
Failed delivery for exchangeId: XXX On delivery attempt: 0 caught:
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
Could not connect to broker URL: tcp://broker2:61616. Reason: Connection timed out: connect |

While these messages are being emitted, camel admin "routes" page becomes
unresponsive (Jetty does not fail as I can still access Endpoints page). The
only way of ending this loop is to shutdown activemq altogether.

My camel configuration can be found here:
Complete log can be found here: 

Is there anything I can do to let camel try to complete inflight messages
for x seconds (e.g. 10 seconds as in my config) and stop the route? I should
then have the option to start it again.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message