This topic describes how you can associate the fan-out message
flow processing with its corresponding fan-in message flow processing by setting
the Aggregate Name property of the AggregateControl and AggregateReply nodes
in your aggregation flow to the same value.
The Aggregate
Name must be contextually unique within a broker. You can have only
one AggregateControl node and one AggregateReply node with a particular Aggregate Name, although it is possible
to have more than one AggregateControl node
with the same Aggregate Name, as
described in Using multiple AggregateControl nodes. It is not advisable
to deploy a fan-in flow to multiple execution groups on the same broker.
You
can either create the fan-out and fan-in flows in the same message flow, or
in two different message flows. In either case, the two parts of the aggregation
are associated by setting the Aggregate Name property.
The
way in which you configure your aggregation flow depends on a number of factors:
- The design of your message flow.
- The hardware on which the broker is running.
- The timeout values that you choose (refer toSetting timeouts for aggregation).
- How you expect to maintain the message flows.
A single flow is easier to implement for a simple case, but there
are some limitations to this approach, and, in most cases, you will find that
the flexibility offered by two message flows is preferable. The following
sample shows the use of two flows for aggregation:
You can view samples only when you use the information center
that is integrated with the Message Brokers Toolkit.
The advantages
of creating separate fan-out and fan-in flows are:
- The two flows can be modified independently of each other.
- The two flows can be stopped and started independently of each other.
- The two flows can be deployed to separate execution groups to take advantage
of multiprocessor systems, or to provide data segregation for security or
integrity purposes.
- The two flows can be assigned different numbers of additional threads
as appropriate to maintain an appropriate processing ratio.
To associate the fan-out flow with the fan-in flow:
In Version 5.0 of the product, fan-out and
fan-in flows were also associated by sending control messages from the
AggregateControl node to the
AggregateReply node.
This facility is no longer available. For optimum performance
it is preferable not to connect the
AggregateControl and
AggregateReply node. However, if you
do want to use control messages in your aggregations and you want to connect
these two nodes refer to
Using control messages in aggregation flows.
Note: Connections
between the
AggregateControl and
AggregateReply node created in Version
5.0 will be ignored once you have migrated them to version 6.0 unless you
set the broker environment to specify otherwise. For more information see,
Using control messages in aggregation flows.