Enterprise integration pattern part -5- Aggregator (Sequential Convoy)


In integration it is a very common task to receive different messages from different locations process them individually and produce a result in the form of a single consolidated message. This task is performed by an aggregator. In the aggregator a Singleton orchestration with sequential or parallel convoys is implemented. There are variations in the collection of input messages i.e. it can be a parallel convoy or a sequential convoy with different or same message types.

You can read more about Aggregator Enterprise integration pattern here.

While implementing the aggregator orchestration you need to ensure that the single instance of the orchestration receives the convoy of messages. There can be two types of convoys.

Sequential Convoy

In sequential convoy all the types of messages are received in an ordered sequence. The first receive shape initializes the correlation set while the other receive shapes follow the correlation set. You can have the first receive shape’s activate property to true and set the initialize correlation property. While the other receive shapes will have the follow correlation set property set and activate property false.

Parallel Convoy

In the parallel convoy the messages arriving are not in a sequence and their sequence does not matter but the processing should be started when all the three messages are received. Configuring the parallel convoy is straight forward. Just drag the parallel shape and add the receive shapes in the parallel shape branches. If the parallel shape is the first shape in the orchestration then each parallel receive shape must have activate property to true and initialize the correlation set otherwise follow the correlation set initialized by any first receive shape or send shape.

In my example I have used a sequential convoy and used a transform shape to aggregate all the three messages into a single message and then send this message through the file port.

aggregator_orch

You can download the example from here.

3 Responses to Enterprise integration pattern part -5- Aggregator (Sequential Convoy)

  1. DipeshA says:

    Hey Abdul,

    Just a quick one…

    I have a rather strange situation where I need to link three files via two diff keys….

    File1
    CustId
    CustName
    .
    .
    .

    File2
    CustId
    ApplId
    .
    .
    .

    File3
    ApplId
    ApplicationDate
    .
    .
    .

    All three messages need to be aggregated into one inbound message.

    Now all three files arrive at the same time. I need to link these three files with custId and ApplId.

    Any thoughts?

    Dipesh

  2. Kaleem Khan says:

    Hi Abdul…..thanks for great post. I have a situation where I need to do this in parallel and receive message from a WCF port and I have messages of 3 different types. Will it possible to use one wcf port to receive 3 different schemes. Thanks !

    Kaleem Khan

  3. amitpatel1985 says:

    Hi Abdul Rafay,

    I have one question here…….. first receive Activate Subscription & second receive shape follow Instance subscription method………….

    if Biztalk receice second message it will create Zombie msg in biztalk… how can we tackle this scenario….

    Thanks,
    Amit Patel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: