camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gale <>
Subject Camel hang on graceful shutdown - NOT trying to stop a route from a route
Date Mon, 23 Jun 2014 18:22:28 GMT

ActiveMQ 5.9.1
Camel 2.13.1
Spring 3.2.5
OS: RHEL 6.3
Tanuki Java Service Wrapper 3.5.24

When I shutdown my broker inside which a Camel context is containing just
one route (shown below) it hangs. The route connects to a topic on a remote
broker and writes out the messages to a queue on the local broker. The
route is about as simple as it gets.

At the time of the hang I get that good old chestnut of a message:

"Still waiting for shutdown of 1 message listener invokers"

After a timeout the Java Service Wrapper kills the broker process - not
good. After some Googling I've seen where others have reported this error

However, the difference here is that I am NOT trying to stop a route from
another route (at least it doesn't look like I am) and yet I still get the
same hang. I am simply trying to stop the broker which should gracefully
shutdown the one route in the Camel context when the broker shuts down.

Clearly I am missing something. Thoughts?


Here is my camel.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="ignoreUnresolvablePlaceholders" value="true"/>
    <property name="locations">

  <!-- Connect to remote broker -->
  <bean id="remote.activemq"
    <property name="brokerURL"
    <property name="userName" value="${activemq.username}"/>
    <property name="password" value="${activemq.password}"/>

  <!-- Connect to local broker -->
  <bean id="activemq"
    <property name="brokerURL"
    <property name="userName" value="${activemq.username}"/>
    <property name="password" value="${activemq.password}"/>

  <bean id="shutdown" class="org.apache.camel.impl.DefaultShutdownStrategy">
    <property name="timeout" value="15"/>
    <property name="suppressLoggingOnTimeout" value="true"/>

  <camelContext id="" autoStartup="${}"
    <propertyPlaceholder id="properties"

      <from uri="remote.activemq:topic:{{source.topic}}?clientId={{}}_camel_client"/>
      <to uri="activemq:{{source.topic}}.browse"/>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message