Versions Compared

Key

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

...

The onCompletion DSL allows you to add custom routes/processors when the original Exchange is complete. Camel spin off a copy of the Exchange and routes it in a separate thread, kinda like a Wire Tap. This allows the original thread to continue while the onCompletion route is running concurrently. We decided for this model as we did not want the onCompletion route to interfere with the original route.

Note
titleOnly 1 onCompletion supported by route scope

You can only have 1 onCompletion in a route. Only at context scoped level you can have multiple. And notice that when you use a route scoped onCompletion then any context scoped are disabled for that given route.

Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionTest.java}

...