Configuring aggregation flows

Use aggregation message flows to generate and fan-out a number of related requests, fan-in the corresponding replies, and compile those replies into a single aggregated reply message, by using the AggregateControl, AggregateRequest, and AggregateReply nodes.

Before you begin

  • Read the concept topic on Message flow aggregation.
  • If you are using aggregation on an integration server that is managed by an integration node, ensure that you have installed IBM® MQ. Information about the state of in-flight messages is held on storage queues that are controlled by IBM MQ, and you must install IBM MQ on the same computer as your integration node if you want to use the capabilities provided by the aggregation nodes. For more information about using IBM MQ with IBM App Connect Enterprise, see Installing IBM MQ.

    If you are using aggregation on an independent integration server, you can use a remote default queue manager to control the system queues, without the need to install IBM MQ on the same machine as the integration server. Interactions between an independent integration server and IBM MQ can use a client connection to a remote queue manager, by using a default policy setting. For information about using a remote default queue manager, see Using a remote default queue manager and Configuring an integration server to use a remote default queue manager.

  • As already stated, information about the state of in-flight aggregation messages is held on storage queues that are created in the default queue manager. If there are other nodes in the aggregation message flows that also use the IBM MQ transport but connect to non-default queue managers, it is possible that intermittent timeouts may occur if the back-end services being called respond extremely quickly. In such cases, it is important that state updates to the aggregation system queues are committed before updates to non-default queue managers are committed: intermittent aggregation timeouts can otherwise occur.

    By default, the commit order for IBM MQ resources is the order in which the resources have been used by the message flow; for example, if an MQInput node is using a remote client connection to a non-default queue manager to drive the aggregation message flow, the MQInput node link is committed first, and the aggregation node's link to the default queue manager is committed second.

    Consider the following example, which shows how the timeout can occur. There is a fan-in message flow at the bottom of the example diagram. This fan-in flow aggregates all the reply messages from the fan-out message flow at the top of the diagram.

    This diagram shows an example message flow in which an intermittent timeout can occur

    In this example, the flow is triggered by a message arriving at the MQInToStartAggr input node, which is using a remote link. The message is propagated through the AggregateControl node to the MQOutput node, which normally sends the message to the back-end application but, in this case, is simply sending it to the fan-in message flow to demonstrate the timing issue. Because the MQOutput node is using the same MQ connection as the input node, the outgoing message is committed first, and the aggregation state message is committed second. Consequently, a message will arrive at the MQInForAggrReplies node before the aggregation state message is visible, and the message will incorrectly be marked as unknown.

    To ensure that the resources on the default queue manager are committed first, you can either set the environment variable MQSI_COMMIT_DEFAULT_QUEUE_MANAGER_FIRST to any value and export it, or update the following setting in the server.conf.yaml configuration file:
    ResourceManagers:
      MQConnectionManager:
        defaultQMCommitSequence: 59  # Determines the relative order of commit for default MQ links; set to 59 for commit before other queue managers, and 62 for after them.
    The resource managers that are used in a message flow are committed in priority order, with the standard IBM MQ connection MQCMIT happening at priority 60, and committing individual queue manager connections in order of use as already described.
    • Setting defaultQMCommitSequence to 59 moves the MQCMIT call for the default queue manager to just before that for other queue managers.
    • Setting defaultQMCommitSequence to 62 places the MQCMIT call for the default queue manager to immediately after that for other queue managers.
    • Remote default queue managers have a default sequence of 59 from IBM App Connect Enterprise 12.0.4 onwards, meaning that the remote default manager is committed first by default.

About this task

By default, the messages are put onto a set of default storage queues (beginning SYSTEM.BROKER.AGGR) for processing, but you can use an Aggregation policy to specify alternative queues. You can also use the Aggregation policy to set a timeout for the aggregation.

For an overview of using aggregation in message flows, see Message flow aggregation.

To configure aggregation flows, see the following topics: