...
Camel leverages thread pools in the following places:
- several EIP patterns supports using thread pools for concurrency
- SEDA component for asynchronous connectivity
- Threads DSL in the Camel route
- ServicePool for pooling services
- And some component provide thread pools by nature such as JMS, Jetty
Thread pool profiles
By default when a thread pool is to be created then its based on the default thread pool profile which is:
...
The default pattern is for:
- Camel 2.9.x or older:
Camel (${camelId}) thread #${counter} - ${name
} - Camel 2.10 onwards:
Camel (#camelId#) thread ##counter# - #name#
Notice we renamed the tokens from Camel 2.10 onwards to not clash with tokens by the Property Placeholder.
In the pattern you can use the following placeholders
- ${camelId} Camel 2.6: is the CamelContext name
- ${counter} is a unique incrementing counter.
- ${name} is the regular thread name.
- ${longName} is the long thread name which can includes endpoint parameters etc.
Notice the pattern name has changed from Camel 2.10 onwards, use #name# instead.
...
Method | Description |
---|---|
shutdown | Marks the thread pool as shutdown, eg just as calling |
shutdownNow | Forces the thread pool to shutdown now, eg just as calling |
shutdownGraceful | Camel 2.11: Marks the thread pool as shutdown, and graceful shutdown the pool, by waiting for tasks to complete. A default timeout value of 10 sec is used, before |
shutdownGraceful(timeout) | Camel 2.11: As above but with custom timeout value |
awaitTermination | Camel 2.11: To wait graceful for the termination of a thread pool (eg to wait for its tasks to complete). Will wait until all tasks is completed or a timeout value is hit. |