About this task
The system administrator is able to restrict the rate
that an individual message flow can
run at by setting the maximum
rate property.
The maximum
rate is specified as the
total number of input messages processed every second. The maximum
rate value is divided equally among
all threads that are running in the message flow irrespective of the number of input nodes within the flow.
To calculate the number of threads within a specific message flow:
- Count the number of input nodes within the flow.
- Add on the number of additional instances that are specified for
each input node.
The following three examples assume the maximum
rate is set to 50, and helps to
highlight some of the variations that can occur from basic to more
complex scenarios:
- A message flow has one input node
with no additional instances:
- Only a single thread in operation.
- The full maximum
rate allocation
of 50 messages every second is applied to that one thread.
- A message flow has one input node
with one additional instance:
- Two threads in operation. One for the node and one for the additional
instance.
- The maximum
rate is split equally
across the two threads. Each thread has a maximum
rate allocation of 25 messages
every second.
- A message flow has three input
nodes with four additional instances that are specified on the first
node and three additional instances that are specified on the second
node:
- 10 threads in operation. Three input node threads, four additional
instance threads for the first node, and three additional instance
threads for the second node.
- The maximum
rate is split equally
across the 10 threads. Each thread has a maximum
rate allocation of five messages
every second.
If any individual thread exceeds their maximum
rate allocation, a processing delay
is introduced on that thread to keep the processing rate under the
assigned maximum
rate allocation.
There are two ways the
maximum
rate can be set for a
message flow:
- Directly within a BAR file.
- As one of the attributes within a workload management policy that is defined within Integration
Registry.
- BAR file
The maximum
rate is set within
the BAR file under a property called maximumRateMsgsPerSec.
The property can
be set in the following ways:
- Within the BAR file through the IBM® Integration Toolkit editor.
Note: You must
refresh the content of a migrated BAR file before you can see and
configure the
maximumRateMsgsPerSec property. For more information, see
Refreshing the contents of a BAR file.
- Within the BAR file through the mqsiapplybaroverride command line.
Note: For example, to set the
maximumRateMsgsPerSec property for a message
flow included in an application, you can use the following sample
code:
mqsiapplybaroverride -b BARfile -k applicationName -m sampleFlow#maximumRateMsgsPerSec=100
For more information, see
mqsiapplybaroverride command.
Additionally, once the BAR file is deployed, the property can be set dynamically within the flow
through the IBM Integration
API. Any change to the
property is picked up immediately and does not require the flow to be
restarted.
- Workload management policy
- Create and configure a workload management policy. For more information about
workload management, see Workload management.
A maximum
rate value
of zero, or not set, causes the message flow maximum
rate to be turned off.
The default state is off.
Within the same integration server, a mixture of message flows can run along side each other, some with the maximum
rate set, others with the maximum
rate turned off.