Showing posts with label MQSC. Show all posts
Showing posts with label MQSC. Show all posts

Jun 10, 2008

MQ correlation set initialization in biztalk


WMQ manager can generate a unique message id (MQMD_MsgID) for you if you put message to queue with MQMD_MsgID set to null.
In MQ/MQC biztalk adapters there is a great feature to get the MQMD_MsgID after putting the message to WMQ queue using solicit response port. After putting the message to queue you get an xml which includes the MQMD_MsgID.


So if you want to send a request and get the response by WMQ you need to do the next steps :
  1. Create send solicit-response port, configure it to Mqseries/MQC adapters.
  2. Create Correlation Set based on MQSeries.Biztalk_CorrelationID
    1. Add Mqseries.dll to your project, from Biztalk bin directory.
    2. Create the correlation type,You can make the correlation only by the MQSeries.Biztalk_CorrelationID because the adapters update it automatically. On send to queue they copy the MQMD_MsgID to MQSeries.Biztalk_CorrelationID and on the receive the adapter copies the value of MQSeries.Biztalk_CorrelationID to MQMD_CorrelationID.
  3. Initialize the Correlation set using "dummy send" port (Null/Nope adapters)
    You cannot initialize it on the receive shape like in the following orchestration , because you will get this error when compile :
    "in a sequential convoy the ports must be identical" .



    you get this error because biztalk cannot determine which message it will get first, the message of the solicit-response (receive shape which initialize the correlation set) or the message of the response followed up the Correlation set.
  4. Set the follow correlation set attribute on the needed receive shape.

    enjoy



<

Feb 12, 2008

Biztalk 2006 MQSC adapter

Hi,

In this post I will explain the benefit of the MQSC (WMQ native api client adapter) over MQS (COM+ server adapter).

When working with wmq and Biztalk on multi server environment I suggest to work with the MQSC adapter and not with MQS adapter.

Because of the following arguments:
  • MQSC Support clustered MQSeries Queue Managers.
    • The MQS adapter make subscriber for each clustered queue, even if it is the same
      queue, but on different qmgr. Creates duplication of messages.
  • MQSC Support clustered BizTalk servers.
  • You can't difine with the MQS adapter a dynamic recieve loaction. Works only with local Qmgr on the biztalk application server.
  • The COM+ level overhead of the MQS adapter.
  • Can define by WMQ channel table file a simple fail over mechanism, using the wild char "*" in the qmgr name.
You can get the inforamtion about the MQSC adapter here :
When using the MQSC adapter it is very important to set the transaction mode on (default off ) when integrating with WMQ queus. Otherwise duplication of messages can occur.