WebSphere Message Brokers
File: ac12312_
Writer: Catherine Tucker

Task topic

This build: July 31, 2007 21:18:24

Using control messages in aggregation flows

The following topic describes the actions required to send control messages.

Before you start:

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

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. 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 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 created in earlier versions of the product will be ignored in Version 6.0.
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 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 as described in Creating the aggregation fan-out flow.
    3. At this stage you can configure a Compute node that creates a valid output message containing the control message. For example, if you want 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, if you want 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 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, as described in Creating the aggregation fan-in flow. This input node will also receive 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 as described in 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 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 connections from the AggregateControl node are active, regardless of the value the environment variable is set to.

When the MQSI_AGGR_COMPAT_MODE environment variable has not been created, the default behavior for aggregation fan-out flows will be 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 will be ignored and no control message will be sent.

If the MQSI_AGGR_COMPAT_MODE environment variable is created, the default behavior for aggregation fan-out flows will not be 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, as described in Creating the aggregation fan-out flow, this connection will be recognized and a control message will be sent. Please note that this is not the optimal configuration and may decrease 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: 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 you must restart the computer.
  • Linux platform UNIX platform z/OS platform On Linux, UNIX and z/OS:
    1. Edit the profile of the broker userid and include the following: export MQSI_AGGR_COMPAT_MODE=
    2. Reload the profile.
    3. Restart the broker.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:18:24

ac12312_ This topic's URL is: