How work Request-Response Pattern (Part 3)


In this part, we will see if it is possible to use a Two-way port with an orchestration that use only one-way logical port and correlation.

If we create a two-way port (WCF-HttpBinding for example) with the 2nd orchestration of previous part, we can see that a new dynamic correlation is created when the message is processing by the two-way port




The properties used are :

  • system-properties.EpmRRCorrelationToken
  • system-properties.RouteDirectToTP


We do the same as in part 2 , ie: use a correlation type and a correlation set on this two property and set the property like this :

msgResponse(BTS.CorrelationToken) =  msgRequest(BTS.CorrelationToken);
msgResponse(BTS.EpmRRCorrelationToken) =msgRequest(BTS.EpmRRCorrelationToken);
msgResponse(BTS.RouteDirectToTP)= true;

we can see the following error :

Event Type:    Error
Event Source:    BizTalk Server 2009
Event Category:    BizTalk Server 2009
Event ID:    5813
Date:        09/02/2010
Time:        14:26:32
User:        N/A
Computer:    BTS06R2
A response message for two-way receive port "ReceiveWCF" is being suspended as the messaging engine could not correlate the response to an existing request message. This usually happens when the host process has been recycled.
MessageId:  {8937BA98-A53A-488B-A239-B3C2895E0737}
InstanceID: {EAA45BB8-513F-4DF1-BE27-CD4ED4E81848}

For more information, see Help and Support Center at

After a small search on google, it seems I apparently forget to write some internal properties that BizTalk Messaging Engine used for request response correlation.

So in my expression shape :

msgResponse(BTS.CorrelationToken) =  msgRequest(BTS.CorrelationToken);
msgResponse(BTS.EpmRRCorrelationToken) =msgRequest(BTS.EpmRRCorrelationToken);
msgResponse(BTS.RouteDirectToTP)= true;
msgResponse(BTS.IsRequestResponse) = true;

and I update also the Correlation Type to use these properties : BTS.CorrelationToken,BTS.EpmRRCorrelationToken,BTS.IsRequestResponse,BTS.ReqRespTransmitPipelineID,BTS.RouteDirectToTP

These properties are explains on these sites :

and on this excellent post of Paolo Salvatori to transform a syncrhonous to an asynchronous flows without an orchestrations :


Conclusion :

With this technique, you could easily couple a synchronous Request Response Port with 2 Asynchronous One-Way Port and use a direct-bindings with the MessageBox

This entry was posted in BizTalk. Bookmark the permalink.

1 Response to How work Request-Response Pattern (Part 3)

  1. Pingback: BRE pipeline framework – To Integration and Beyond

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Connecting to %s