Table of Contents
Task to be executed when normal route processing completes
The On Completion pattern defines a set of steps that are executed when normal route processing is completed. It can either be scoped local to a specific route or globally for all routes defined in the context.
![]() | Important |
|---|---|
Locally scoped On Completion patterns take precedent over globally scoped ones. Therefore, the globally scoped pattern will not be executed when a locally scoped On Completion pattern exists. |
When specifying a locally scoped On Completion pattern, the pattern directly follows the
from endpoint in the route.
When specifying a globally scoped On Completion pattern, the pattern starts a new route.
Table 67, “On Completion Properties” describes the properties you can specify using the properties editor.
Table 67. On Completion Properties
| Name | Description |
|---|---|
| Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |
| Specifies a reference for looking up the executorService to use for thread pool management. |
| Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
| Specifies when the
|
| Specifies whether the path will be taken only if message processing completes
successfully. Cannot be enabled if |
| Specifies whether the path will be taken only if message processing fails. Cannot
be enabled if |
| Sets an additional logic that should be true before the OnCompletion is triggered. It is used for fine grained controlling whether a completion callback should be invoked or not. |
| Specifies whether the aggregate method on the |
| Specifies whether the message that began the route is placed in the dead letter queue instead of the message that caused the exception. The default is Disabled. |