IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Setting timeout values for aggregation

You can use two properties of the aggregation nodes to set timeout values for aggregated message processing.

Before you start:
To complete this task, you must have completed the following tasks:
Two situations might require the use of timeouts:
  • The need to receive an aggregated reply message within a specified time. For this situation, you set the Timeout property of the AggregateControl node.
  • The need to wait before propagating an unrecognized message to the Unknown terminal. For this situation, you set the Unknown Message Timeout property on the AggregateReply node.
The following sections describe each situation in more detail.

To receive an aggregated reply message within a specified time

In some situations, you might need to receive an aggregated reply message within a specified time. Some reply messages might be slow to return, or might never arrive. For these situations, open the fan-out message flow and set the timeout interval by using one of the following steps:
Directly on the AggregateControl node
Set the Timeout property of the AggregateControl node to specify how long (in seconds) the broker must wait for replies. By default, this property is set to 0 (zero), which means that there is no timeout and the broker waits indefinitely. For more information, see AggregateControl node.
Using an Aggregation configurable service
You can also use an Aggregation configurable service to specify the timeout interval. You can create an Aggregation configurable service with the same name as the Aggregate name property of the AggregateControl node, and specify the timeout value in the timeoutSeconds property of the configurable service. Alternatively, you can create an Aggregation configurable service with the same name as the integration server. However, the name of a configurable service cannot start with a digit; if the name of the configurable service is to be the same as that of the integration server, ensure that the name of the integration server does not start with a digit. Values from Aggregation configurable services are taken in the following order:
  1. If an Aggregation configurable service exists with the same name as the aggregation, which is defined in the Aggregate name property, that configurable service is used.
  2. If no configurable service exists with the same name as the aggregation, but a configurable service exists with the same name as the integration server, that configurable service is used.

If an Aggregation configurable service exists with the same name as an integration server, it can be used for every aggregation in the integration server. However, if a configurable service exists with the same name as an aggregation in the integration server, it is used for that specific aggregation. In each case, the value of the timeoutSeconds property of the configurable service overrides the Timeout property of the AggregateControl node.

Unlike the Timeout property of the AggregateControl node, you can set the timeoutSeconds property value to one decimal place, allowing timeout intervals of less than one second if required. Values of 0.5, 1.7, and 100.1 are all valid, but a value of 0.22 is invalid.

When setting timeout intervals of less than one second, it is recommended that the queuePrefix property is set up and the timeoutThreads property is set to a minimum of 2. This is to make sure that the timeout processing has sufficient resources to meet the timeout requirements. Despite this, users may well encounter other unexpected operational factors that could impact on the ability to run timeout intervals below the one-second requirement.

For more information about the Aggregation configurable service, see Configurable services properties.

Dynamically from an incoming message

You can use the Timeout location property of the AggregateControl node to specify the location of a timeout value in the incoming message. Any timeout value that is specified in this way overrides the values that are specified by the AggregateControl node and the Aggregation configurable service.

In the same way, as for the Aggregation configurable service, the timeout value is specified down to one decimal place.

For more information, see AggregateControl node.

The timeout precedence is determined by values being set in the message, the configurable service, or the node, in the following order:
  1. If a timeout value is specified in the incoming message (in the location that is specified by the Timeout location property of the AggregateControl node) this value is used.
  2. If no location is specified by the Timeout location property, or if the location in the message is empty or does not exist, the value that is specified by the timeoutSeconds property of the Aggregation configurable service is used (if one exists).
  3. If no Aggregation configurable service has been defined, or if the timeoutSeconds property of the configurable service is not set, the value that is set in the Timeout property of the AggregateControl node is used.

By default, timeout polling occurs every 5 seconds. Therefore, if you set the Timeout property to a value that is not a multiple of 5, an extra delay occurs. For example, if you set the Timeout property to 7 seconds, you see a delay of 3 seconds until timeout polling next occurs. You can change the default timeout polling interval by using the environment variable MQSI_AGGR_WAIT_TIMEOUT. Valid values are 1000 - 5000 milliseconds. To change the default polling interval, stop the broker, then restart the broker in an environment where you have set the MQSI_AGGR_WAIT_TIMEOUT environment variable.

If a Timeout property value has been set to less than one second the timeout polling interval rules are ignored. In this instance the timeout polling interval is automatically calculated as part of timeout processing. Therefore, no manual intervention is required in order to update the environment variable MQSI_AGGR_WAIT_TIMEOUT.

If the timeout interval passes without all the replies arriving, the replies that have arrived are turned into an aggregated reply message by the corresponding AggregateReply node, and propagated to its Timeout terminal. You can process this partial response message in the same way as a complete aggregated reply message. If you prefer, you can provide special processing for incomplete aggregated replies.

To wait before propagating an unrecognized message to the Unknown terminal

When a message arrives at the In terminal of an AggregateReply node, it is examined to see if it is an expected reply message. If it is not recognized, the message is propagated to the Unknown terminal. You might want the broker to wait for a specified time period before propagating the message for the following reasons:
  • The reply message might arrive before the work completed by the AggregateRequest node has been transactionally committed. This situation can be avoided by configuring the Transaction mode property of the input node, as described in Creating the aggregation fan-out flow.
  • The reply message might arrive before the control message. This situation can be avoided by leaving the Control terminal of the AggregateControl node unconnected. For more information about the implications of connecting the Control terminal, see Using control messages in aggregation flows.
These situations are most likely to happen if you send the request messages out of syncpoint, and might result in valid replies being sent to the Unknown terminal. To reduce the likelihood of this event, complete the following steps.
  1. Open the fan-in message flow.
  2. Set the Unknown Message Timeout property of the AggregateReply node.

    When you set this property, a message that cannot be recognized immediately as a valid reply is held persistently in the broker for the number of seconds that you specify for this property.

If the unknown timeout interval expires, and the message is recognized, it is processed. The node also checks to see if this previously unknown message is the last reply that is needed to make an aggregation complete. If it is, the aggregated reply message is constructed and propagated.

If the unknown timeout interval expires and the message is still not recognized, the message is propagated to the Unknown terminal.


ac12320_.htm | Last updated Friday, 21 July 2017