Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you do not want to see these logs, you can suppress this by setting the option SuppressLoggingOnTimeout to true.

Code Block
context.getShutdownStrategegygetShutdownStrategy().setSuppressLoggingOnTimeout(true);

...

If you do not want to see these logs, you can turn this off by setting the option logInflightExchangesOnTimeout to false.

Code Block
context.getShutdownStrategegygetShutdownStrategy().setLogInflightExchangesOnTimeout(false);

...

A Java DSL based example to defer shutting down the 2nd route:

Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownDeferTest.java}
The same route in Spring XML would be:
Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/ShutdownDeferTest.xml}

Tip
titleDefer shutting down internal routes only

Its best to only defer shutting down internal routes only. As public routes should shutdown as quickly as possible otherwise it will just keep intake new messages which will delay the shutdown processor. Or even have it timeout if a lot of new messages keep coming in.

...

A Java DSL based example to complete all messages during shutting down the first route:

Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ShutdownCompleteAllTasksTest.java}
The same route in Spring XML would be:
Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/ShutdownCompleteAllTasksTest.xml}

JMX managed

The ShutdownStrategy is JMX aware as well so you can manage it from a JMX console. For example you can change the timeout value.

...