On Completion — Route 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 39 describes the properties you can specify using the properties editor.
Table 39. On Completion Properties
Name | Description |
---|---|
Executor Service Ref | Specifies a reference for looking up the
executorService to use for
thread pool management. |
Inherit Error Handler | Specifies whether the node should use the error handler configured for the route.
The default is Disabled . |
On Failure Only | Specifies whether the path will be taken only if message processing fails. Cannot
be enabled if On Complete Only is enabled. The default is
Disabled . |
Use Original Message Policy | 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 . |
On Complete Only | Specifies whether the path will be taken only if message processing completes
successfully. Cannot be enabled if On Failure Only is enabled.
The default is Disabled .
|
Id | Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file. |
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. |