Hi You can configure the default timeout of 300 seconds to a lower value http://camel.apache.org/graceful-shutdown.html
On Thu, Aug 11, 2011 at 2:42 PM, oseymen <[email protected]> wrote: > Hi, > > 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 if broker2 is unreachable, I can see > that PooledConnectionFactory is still trying to access broker2 even after I > get "Route: route1 shutdown complete" in the log file (log file attached). > > Log file contains startup messages up until line 202. Line 202+ is written > when I click stop button in the admin interface for the route. > > I've setup DefaultShutdownStrategy to wait inflight operations for 10 > seconds and shutdown. This can be seen in the log between 203 and 237. > > Then from line 299 which repeats until I kill activemq process: > > Still waiting for shutdown of 16 message listener invokers | > org.apache.camel.component.jms.JmsMessageListenerContainer > 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://10.206.38.97:61616. Reason: > java.net.ConnectException: Connection timed out: connect | > org.apache.camel.processor.DefaultErrorHandler > > When these are happening, admin routes page becomes unresponsive. Only > option left is to kill activemq process completely. > > I've also attached my camel configuration. > > Is there anything I can do to let camel try to complete inflight messages > for x seconds and stop the route if it fails? I should then have the option > to start it again. > > I'd appreciate if you can help with this or point out any mistakes in my > configuration. > > http://camel.465427.n5.nabble.com/file/n4689384/activemq.log activemq.log > http://camel.465427.n5.nabble.com/file/n4689384/camel.xml camel.xml > > Thanks, > Ozan > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problem-stopping-activemq-to-activemq-route-inflight-messages-tp4689384p4689384.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
