Workload management policy

Use a workload management policy to control the workload management attributes without the need to redeploy your resources.

Workload management enables you to monitor and manage message flows. For more information, see Workload management.

A workload management policy allows system administrators to perform the following tasks:
  • Restrict the maximum rate at which a message flow can run.
  • Cause a notification message to be sent if the number of messages that arrive in the flow exceeds a specified threshold.
Workload management policies are set at the message flow level. A workload management policy can be set up and administered within the Integration Registry in the following ways:
  • Using the web user interface
  • Using the IBM® Integration API
  • Using the command line
Note: A workload management policy cannot be attached to a subflow.

When a workload management policy is created and the resources are deployed, the following precedence rules apply:

  • Property values that are set in the policy take precedence over property values that are set in the BAR file
  • If a particular property value is not set in the policy, the equivalent property value that is set in the BAR file takes effect
  • If no policy is attached, the BAR file property values take effect
The following property values can be controlled by using a workload management policy:
Property Description of property

additionalInstances

The number of additional threads that the integration node can use to service the message flow. The value can be any positive integer.

This property is optional. The default value is not set.

commitCount

For WebSphere® MQ messages. Specifies how many input messages are processed by a message flow before a sync point is taken (by issuing an MQCMIT). The value can be any positive integer.

This property is optional. The default value is not set.

commitInterval

For WebSphere MQ messages. Specifies a time interval in seconds at which point a commit is taken, when the commitCount property is greater than 1 (that is, where the message flow is batching messages), but the number of messages that are processed has not reached the value of the commitCount property. The value can be any positive integer.

This property is optional. The default value is not set.

maximumRateMsgsPerSec

The maximum rate the message flow can process messages at. The maximum rate is specified as the total number of input messages processed every second. If necessary, a processing delay is introduced to keep the input message processing rate under the maximum rate setting. To activate, the value can be any positive integer. A value of zero disables the maximum rate mechanism.

This property is optional. The default value is not set.

notificationThresholdMsgsPerSec

The threshold rate where a notification message is published when the message rate exceeds the value that is given. The message rate is a measure of the total messages processed every second. To activate, the value can be any positive integer. A value of zero disables the notification threshold mechanism.

This property is optional. The default value is not set.

processingTimeoutSec

The time in seconds a message can take to be processed in a message flow before the timeout action is taken. The time is taken from the point a message is received on an input node.

This property is optional. The default value is not set. Any positive integer value is valid.

processingTimeoutAction

The action to take when the processingTimeoutSec has been exceeded.

This property is optional. The default value is not set. A value of restartExecutionGroup will cause the integration server to be restarted.

startInstancesWhenFlowStarts

Specifies whether all additional instance threads are to start when the flow starts. Both flow and node-scope instances start if this option is set to true. The value can be Yes or No.

This property is optional. The default value is not set.

startMode

You can set the default behavior of message flows and applications when you deploy or restart an integration server. The value can be Maintained, Manual, or Automatic.

This property is optional. The default value is not set.

For more information, see Setting the start mode of message flows and applications at run time.

The following XML is an example of a workload management policy document:
<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
  <iwlm:workloadManagement xmlns:iwlm="http://www.ibm.com/xmlns/prod/websphere/iib/9.0.0/policy/wlm">
    <!-- Each of the following lines specify a value in the policy. -->
    <!-- If any are left blank or missed out then the deployed value on the message flow is used. --> 
    <!-- Notification threshold - Number of messages per second. A value of zero disables the mechanism. -->
    <iwlm:notificationThresholdMsgsPerSec></iwlm:notificationThresholdMsgsPerSec>
    <!-- Maximum rate - Number of messages per second. A value of zero disables the mechanism. -->
    <iwlm:maximumRateMsgsPerSec></iwlm:maximumRateMsgsPerSec>
    <!-- Processing timeout - Number of seconds. A value of zero disables the mechanism. -->
    <iwlm:processingTimeoutSec></iwlm:processingTimeoutSec>
    <!-- Processing timeout action - none or restartExecutionGroup.  -->
    <iwlm:processingTimeoutAction></iwlm:processingTimeoutAction>
    <!-- Additional instances - Number of additional message flow instances.-->
    <iwlm:additionalInstances></iwlm:additionalInstances>
    <!-- Start instances when flow starts - true or false.-->
    <iwlm:startInstancesWhenFlowStarts></iwlm:startInstancesWhenFlowStarts>
    <!-- Commit count - Numnber of transactions to execute before commiting.-->
    <iwlm:commitCount></iwlm:commitCount>
    <!-- Commit interval- Nunber of milliseconds to wait before commiting.-->
    <iwlm:commitInterval></iwlm:commitInterval>
    <!-- Start mode - maintained, manual, or automatic -->
    <iwlm:startMode></iwlm:startMode>
  </iwlm:workloadManagement>
</wsp:Policy>