Introduction

Let's start with the introduction to the MQSC adapter, it is MQSeries Client based adapter which lets the Client communicate with the IBM MQ Server where the actual queue manager is present. Now there are two different type of bindings that could be used in this adapter to communicate to the MQ Server :

IBM MQ Client binding

This binding uses the IBM MQ Client which is a component that should be installed while installing the IBM MQ setup. This is legacy binding which was getting used extensively before BizTalk 2016 launch.

Microsoft MQ Client binding

This binding is a new type of binding introduced in BizTalk 2016, according to Microsoft documentation this is the fastest binding and can be used to communicate to IBM MQ server in no time. Let's find out the difference in how they are configured in MQSC adapter!

Setting up HIS 2016 (only in case of using Microsoft MQ Client Binding)

Host integration server should be configured in case you want to use the Microsoft MQ Client binding. There are various components in HIS configuration tool like Common Settings, Network Settings, and Message Integration










Setting up the IBM MQ Queue Manager

As stated earlier I am using IBM MQ 9.1 version for this exercise, from WebSphere MQ 8.0 onward a new function is introduced, which requires MQ administrators to supply the user id and password for access, or an error message is generated. I am going to deliberately disable this security feature moving forward. I am not going in the details of the installation of IBM MQ, for reference purpose I have installed the IBM MQ 9.1 Developer version with Client, Server & MQ explorer. Let's start with the creation of Queue Manager with MQ explorer, there would series of next and at one of the screens you have to provide the Listener port where a port number should be provided and in my case I have used 1415 as the port number.



Next step is to create a new Channel. A server connection channel is a bidirectional MQI channel that is used to connect a WebSphere MQ client to a WebSphere MQ server. The server connection channel is the server end of the channel.
Therefore we create a new Server connection channel called BTChannel.



Now its time to create the main queue in which the messages would get stored. Right-click the Queue on MQ in BizTalkQueue and create a new queue like below:



Now we are done with complete Queue manager creation, as stated earlier we need to remove the security of the Queue Manager for BizTalk to send the messages. Here are the steps to do that:
Open the command prompt and type the following commands in sequence :
  • runmqsc BizTalkQueue
    • ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(OPTIONAL)
    • REFRESH SECURITY TYPE(CONNAUTH) 
  • Right-click the BizTalkQueue-> Communication-> Channel authentication record -> Disable


Now we are done with MQ tasks, so let's move to BizTalk application creation.

Creating BizTalk Application

Creating the BizTalk application is fairly simple, we need a file to receive port, receive location (pass thru) and mqsc sendport (pass thru). A new application in BizTalk admin console with these artifacts can be created. Now the main task is to configure the send port with IBM MQ Client binding or Microsoft MQ Client binding.

Creating send port with IBM MQ Client binding

Here is the configuration of MQSC send adapter with IBM MQ Client binding, we need to set Use Microsoft MQ Client binding to NO, we need to provide the Channel Name, Queue, and Queue Manager name. Userid and password are optional, these are not relevant as we have removed the Queue manager security already.



Changing the send port to Microsoft MQ Client binding

For Microsoft MQ Client binding the Use Microsoft MQ Client binding is set to YES along with that Channel name, Connection name, Queue and Queue Manager name are provided. The Connection name property is nothing but the MachineName(port of the Listener defined while creating the Queue Manager)



Testing the Application

For testing the application we drop any file at the receive location and we can check the MQ queue BTQueue. The current queue depth represents the number of messages present in the queue. According to Microsoft Documentation, Microsoft MQ Client binding is way faster than the IBM MQ Client binding.