此内容没有您所选择的语言版本。

Chapter 20. Configuring JBI Component Thread Pools


Abstract

The JBI components included in Red Hat JBoss Fuse use a thread pool to process message exchanges. You can configure each component's thread pool independently.

Overview

The JBI components are multi-threaded. Each one maintains a thread pool that it uses to process message exchanges. These thread pools are configured using three properties that control the minimum number of threads in the pool, the maximum number of threads in the pool, and the depth of the component's job queue.

Component configuration PIDs

The thread pool properties can be customised for a particular JBI component, ComponentName, by adding the relevant PID to the OSGi Admin service. Each JBI component has a corresponding PID that matches the pattern org.apache.servicemix.components.ComponentName.
The thread pool properties can also be configured using a JMX console.
Important
The component needs to be restarted for changes to take effect.

Thread pool properties

Table 20.1, “Component Thread Pool Properties” lists the properties used to configure component thread properties.
Expand
Table 20.1. Component Thread Pool Properties
PropertyDefaultDescription
corePoolSize8Specifies the minimum number of threads in a thread pool. If the number of available threads drops below this limit, the runtime will always create a new thread to handle the job.
maximumPoolSize32Specifies the maximum number of threads in a thread pool. Setting this property to -1 specifies that it is unbounded.
queueSize256Specifies the number of jobs allowed in a component's job queue.

Thread selection

When a component receives a new message exchange it choose the thread to process the exchange as follows:
  1. If the component's thread pool is smaller than the corePoolSize, a new thread is created to process the task.
  2. If less than queueSize jobs are in the component's job queue, the task is placed on the queue to wait for a free thread.
  3. If the component's job queue is full and the thread pool has less than maximumPoolSize threads instantiated, a new thread is created to process the task.
  4. The job is processed by the current thread.

Example

Example 20.1, “Component Thread Pool Configuration” shows the configuration for a component whose thread pool can have between 10 and 200 threads.

Example 20.1. Component Thread Pool Configuration

corePoolSize = 10
maximumPoolSize = 200
...
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部