Job Executor Configuration

Этот раздел перенесён из документации Camunda 7 и в дальнейшем будет доработан с учётом особенностей OpenBPM Engine

The job executor tag is used to configure the job executor and can be placed in the bpm-platform.xml file.

Example

The following example shows a job executor XML snippet:

<job-executor>
  <job-acquisition name="default">
    <properties>
      <property name="maxJobsPerAcquisition">5</property>
      <property name="waitTimeInMillis">8000</property>
      <property name="lockTimeInMillis">400000</property>
    </properties>
  </job-acquisition>
  <properties>
    <!-- Note: the following properties only take effect in a Tomcat environment -->
    <property name="queueSize">3</property>
    <property name="corePoolSize">5</property>
    <property name="maxPoolSize">10</property>
    <property name="keepAliveTime">0</property>
  </properties>
</job-executor>

Syntax Reference

Tag name Parent tag name Required?

Description

&lt;job-executor&gt;

&lt;bpm-platform&gt;

true <td> Container element for the configuration of a job executor.

Attributes: None.

Text Content: None.

</td>

&lt;job-acquisition&gt;

&lt;job-executor&gt;

true <td> Specifies a job acquisition thread.

Attributes: <ul> <li>name: Defines the name of the job acquisition thread.</li> </ul>

Text Content: None.

</td>

&lt;job-executor-class&gt;

&lt;job-acquisition&gt;

false <td> Specifies the fully qualified classname of the job executor.

Attributes: None.

Text Content: None.

Example: &lt;job-executor-class&gt;io.openbpm.bpm.example.MyJobExecutor&lt;/job-executor-class&gt;

</td>

&lt;properties&gt;

&lt;job-acquisition&gt; or &lt;job-executor&gt;

false <td> Container element for providing a set of thread configuration properties.

Attributes: None.

Text Content: None.

</td>

&lt;property&gt;

&lt;properties&gt;

Job-Executor Configuration Properties

The following is a list with the available job acquisition thread configuration properties, along with some explanations. The properties can be used in the <property name="foo">bar</property> tag, where foo is the name of the property and bar is the value of the property.

LIMITATION

These properties only take effect in a Tomcat environment.

Property name Type Description

queueSize

Integer <td> Sets the size of the queue which is used for holding tasks to be executed. Default Value: 3 </td>

corePoolSize

Integer <td> Sets the size of the core pool in the thread pool. This number of threads will always be present and wait to execute tasks. Default Value: 3 </td>

maxPoolSize

Integer <td> Sets the maximum number of threads that can be present in the thread pool. Default Value: 10 </td>

Job-Acquisition Configuration Properties

The following is a list with the available job acquisition thread configuration properties, along with some explanations. The properties can be used in the <property name="foo">bar</property> tag, where foo is the name of the property and bar is the value of the property.

Property name Type Description

maxJobsPerAcquisition

Integer <td> Sets the maximal number of jobs to be acquired at once. Default Value: 3 </td>

lockTimeInMillis

Integer <td> Specifies the time in milliseconds an acquired job is locked for execution. During that time, no other job executor can acquire the job. Default Value: 300000 </td>

waitTimeInMillis

Integer <td> Specifies the wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition. If this is repeatedly the case, the wait time is increased exponentially by the factor waitIncreaseFactor. The wait time is capped by maxWait. Default Value: 5000 </td>

maxWait

Long <td> Specifies the maximum wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition. Default Value: 60000 </td>

backoffTimeInMillis

Integer <td> Specifies the wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked. This condition indicates that there are other job acquisition threads acquiring jobs in parallel. If this is repeatedly the case, the backoff time is increased exponentially by the factor waitIncreaseFactor. The time is capped by maxBackoff. With every increase in backoff time, the number of jobs acquired increases by waitIncreaseFactor as well. Default Value: 0 </td>

maxBackoff

Long <td> Specifies the maximum wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked. Default Value: 0 </td>

backoffDecreaseThreshold

Integer <td> Specifies the number of successful job acquisition cycles without a job locking failure before the backoff time is decreased again. In that case, the backoff time is reduced by waitIncreaseFactor. Default Value: 100 </td>

waitIncreaseFactor

Лицензия и атрибуция

Эта документация была создана на базе материала "Camunda 7 Docs" от Camunda, находится под лицензией Creative Commons Attribution-ShareAlike 3.0 Unported License .

Оригинал документации: https://docs.camunda.org