Using control messages in aggregation flows

In WebSphere® Message Broker the default behavior is that connections between AggregateControl and AggregateReply nodes for sending control messages are ignored. This configuration optimizes performance and removes the possibility that response messages will be received by the AggregateReply node before the control message.

Before you start:

To complete this task, you must have completed the following tasks:

Control messages are not necessary to make aggregations work correctly. However, it is still possible for you to send control messages in your aggregation flows if it is necessary. To send control messages in a message flow created in WebSphere Message Broker Version 6.0, see Configuring message flows to send control messages and Configuring a broker environment to send control messages.
Important: If you created message flows in Version 5.0 and configured them to use control messages, and you want to continue using control messages, see Configuring a broker environment to send control messages. Unless you complete this task, the connections between the AggregateControl and AggregateReply nodes that were created in earlier versions of the product are ignored.
For a working example of aggregation (without the use of control messages), see the following sample: You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.

Configuring message flows to send control messages

To configure message flows to send control messages from an AggregateControl node to an AggregateReply node:
  1. Switch to the Broker Application Development perspective.
  2. If you have created the fan-out and fan-in flows in a single message flow:
    1. Open the aggregation message flow.
    2. Connect the Control terminal of the AggregateControl node to the Control terminal of the AggregateReply node to make the association.

    This connection is referred to as a direct connection between the two aggregation nodes.

  3. If you have created separate fan-out and fan-in message flows:
    1. Open the fan-out message flow.
    2. Configure the AggregateControl node, see Creating the aggregation fan-out flow.
    3. At this stage, you can configure a Compute node that creates a valid output message that contains the control message. For example, to pass the control message to an MQOutput node, configure the Compute node to add an MQMD to the message and complete the required fields in that header. For example, you can code the following ESQL:
      SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
      SET OutputRoot.MQMD.Format = MQFMT_STRING;
    4. Configure an output node that represents the intermediate destination for the control message. For example, to send the control message to an intermediate WebSphere MQ queue, include an MQOutput node and identify the target queue in the Basic properties Queue Manager Name and Queue Name.
    5. Connect the Control terminal of the AggregateControl node to the In terminal of the Compute node, and connect the Out terminal of the Compute node to the In terminal of the output node that represents the intermediate destination for the control message.
    6. Open the fan-in message flow.
    7. Configure one input node to receive the reply messages, see Creating the aggregation fan-in flow. This input node also receives the control information from the AggregateControl node. For example, set the Basic property Queue Name of the MQInput node to receive the response and control message from an intermediate WebSphere MQ queue.
    8. Add a Filter node to your fan-in flow after the input node and before the AggregateReply node, see Avoiding thread starvation on fan-in flows.
    9. Connect the Out terminal of the input node to the In terminal of the Filter node.
    10. Connect the Out terminals of the Filter node to the Control terminal and in terminal of the AggregateReply node.

    This connection is referred to as an indirect connection between the two aggregation nodes.

Configuring a broker environment to send control messages

By default, in WebSphere Message Broker Version 6.0, any connections from the Control terminal of the AggregateRequest node to the AggregateReply node are ignored. For these connections to be active, create the MQSI_AGGR_COMPAT_MODE environment variable in the broker's environment. By default, the environment variable does not exist. The existence of the environment variable means that connections from the AggregateControl node are active, regardless of the value to which the environment variable is set.

When the MQSI_AGGR_COMPAT_MODE environment variable has not been created, the default behavior for aggregation fan-out flows is used. If the Control terminal of the AggregateControl node is connected, either directly or indirectly, to the In terminal of the AggregateReply node, this connection is ignored and no control message is sent.

If the MQSI_AGGR_COMPAT_MODE environment variable is created, the default behavior for aggregation fan-out flows is not used, allowing you to send control messages from the AggregateControl node to the AggregateReply node. If the Control terminal of the AggregateControl node is connected, either directly or indirectly, to the In terminal of the AggregateReply node, see Creating the aggregation fan-out flow, this connection is recognized and a control message is sent. Be aware that this configuration is not the optimal configuration and might affect performance.

To create the MQSI_AGGR_COMPAT_MODE variable to allow connections between AggregateControl and AggregateReply nodes to be recognized:
  • Windows platform On Windows®:
    1. Open System Properties by clicking Start > Control Panel > System.
    2. Click the Advanced tab.
    3. Click Environment Variables.
    4. In the System variables pane, click New.
    5. Under Variable name type MQSI_AGGR_COMPAT_MODE.
    6. (Optional) You can type in the Variable value or leave it blank.
    7. For the environment variable to take effect, restart the computer.
  • Linux platformUNIX platformz/OS platform On Linux®, UNIX® and z/OS®:
    1. Edit the profile of the broker userid and include the following code:
      export MQSI_AGGR_COMPAT_MODE=
    2. Reload the profile.
    3. Restart the broker.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:20:19

ac12312_