Monitoring IBM MQ (WebSphere MQ) with BizTalk360

Published on : Nov 8, 2018

Category : General

Raja Sreenivasan

Author

Introduction

In this article, we will provide an introduction of IBM MQ, how BizTalk Server can connect to IBM MQ and how to setup monitoring of IBM MQ Queues with BizTalk360.

IBM® MQ, formerly known as WebSphere MQ, is messaging-oriented middleware, which simplifies and accelerates the integration of different applications and data across multiple platforms. It uses message queues to exchange information for independent and non-concurrent applications in distributed systems. IBM MQ is available for large number of platforms, being:

  • z/OS (mainframe)
  • OS/400 (IBM System I or AS/400)
  • UNIX (AIX, HP-UX. Solaris)
  • HP Nonstop
  • Linux
  • OS 2000
  • Microsoft Windows

Microsoft Windows Platform

IBM MQ is messaging and queueing middleware, with several modes of operation:

    • Point-to-point
    • Publish/Subscribe
    • File Transfer


    For the Microsoft platform, users can create and manage IBM MQ with two options:

    • MQ Explorer GUI
    • Running commands from command window or application.

    cta For installing the MQ Explorer GUI, you can refer to this link and for installing the server using msiexec you can go to this link.

BizTalk Server and IBM MQ

As a middleware product, BizTalk Server can also connect to IBM MQ. For using IBM MQ with BizTalk Server, there are two adapters available.

  1. MQSeries Client (MQSC) Adapter
  2. MQSeries Adapter

MQSeries Client (MQSC) Adapter

The MQSC Adapter is available in the BizTalk Adapter for Host Systems installation that is part of Host Integration Server(HIS). This adapter is a light weight component of MQ that doesn’t require the MQSeries Queue Manager run-time code to reside on a client system. This adapter helps to connect IBM MQ queue manager on Windows and non-Windows platform. Using the MQSeries Client Adapter can do the following actions:

  • Send and receive messages from local Queue, MQSeries Remote Queue, Transmission Queue, and Alias queue from BizTalk Server
  • Connect Remote queue manager that reside on Windows platform or another platform directly from BizTalk server
  • It Support Clustered MQSeries Queue Manager and clustered BizTalk servers
  • It provides support Secure Socket Layer(SSL) for secure communication with MQSeries Queue Manager

MQSC Adapter Configuration

In a real-time scenario, the setup would be the following when using two servers

Server 1 (Windows)

Server 2 (Windows/Non-Windows)

BizTalk Server

WebSphere MQ

MQSC Adapter

 

WebSphere MQ Client (available from IBM)

 


If you want to use the WebSphere MQ Extended transactional client, you can use WebSphere MQ Client in Server 1.

MQSeries Adapter

MQSeries adapter requires IBM MQSeries Server for Windows to reside on the client system to communicate with an IBM WebSphere Queue Manager running on Windows or non-Windows. MQSeries comes with BizTalk Server installation. This adapter uses the MQSAgent2 COM+ application to put/get messages into the IBM MQ Queue Manager.  Using the MQSeries Adapter can do the following actions:

  • Send and Receive messages from local Queues, MQSeries Remote Queues, Transmission Queues, and Alias queues from BizTalk Server
  • Send and Receive messages from MQSeries Server for Windows. You need to deploy one copy of MQSAgent (COM+ of the adapter) to support BizTalk server installation
  • Dynamically create queues at runtime
  • Request for Delivery of transactional and non-transactional messages for send and receive
  • Dynamically receive messages from queues based on MQSeries MatchOptions

MQSeries Adapter Configuration

IBM MQ can be installed in multiple different configurations. Below you find an overview of which components need to be installed in case IBM MQ will be installed on one, two or three servers.

For configuring the MQSeries Adapter on a single Server:

Server 1 (Windows)

BizTalk Server

MQSeries Adapter

MQSAgent2 COM+ Application

WebSphere MQ

 

And for the configuring it in two servers:

Case 1 – Installation while combining Windows and Non-Windows servers

Server 1 (Windows)

Server 2 (Windows/Non-Windows)

BizTalk Server

WebSphere MQ

MQSeries Adapter

 

MQSAgent2 COM+ application

 

MQSeries Server for windows

 

 

Case 2 – Installation on 2 Windows servers

Server 1 (Windows)

Server 2 (Windows)

BizTalk server

MQSAgent2 COM+ application

MQSeries adapter

WebSphere MQ

 

If you want to configure MQSeries Adapter on three servers, the configuration would be as follows:

Server 1 (Windows)

Server 2 (Windows)

Server 3 (Windows/Non-Windows)

BizTalk Server

MQSAgent2 COM+ Application

WebSphere MQ

MQSeries Adapter

MQSeries Server for windows (Available from IBM)

 

 

Monitoring IBM MQ with BizTalk360

BizTalk360 has the capability to monitor the IBM MQ Queues that are configured with the receive location and send ports mapped with either MQSeries Client Adapter or MQSeries Adapter. BizTalk360 has the following requirements:

  • Monitor the accessibility of the queue manager and queues
  • Monitor the growth of queues and corresponding backout queue
  • Identify the backout queues automatically and start monitoring them

You can refer to this link for an article about how to configure an IMB MQ queue for monitoring with BizTalk360.

Errors while connecting from BizTalk360 to IBM MQ

Customer might face errors or technical challenges while configuring BizTalk360 to monitor IBM MQ queues. Some of the error codes are:

  • 2033 – MQRC_NO_MSG_AVAILABLE
  • 2035 – MQRC_NOT_AUTHORIZED
  • 2059 – MQRC_Q_MGR_NOT_AVAILABLE
  • 2538 – MQRC_HOST_NOT_AVAILABLE

We can see the details about the errors and resolution:

MQRC_NO_MSG_AVAILABLE – 2033

MQRC_NO_MSG_AVAILABLE

Reason: There is no message on the queue

Resolution: This is an expected condition; no corrective action is required.

MQRC_NOT_AUTHORIZED – 2035

MQRC_NOT_AUTHORIZED

Reason: Trying to open a queue in a cluster

Resolution: create a local alias to the cluster queue, or authorize all users to have access to the transmission queue

Provide object authorities in the queue level or queue manager level  to the user in the MQ Explorer.

 

MQRC_Q_MGR_NOT_AVAILABLE – 2059

MQRC_Q_MGR_NOT_AVAILABLE

Reason:

  1. The default queue manager is not running
  2. The MQ listener program associated with the default queue manager is not running
  3. The default queue manager is not defined on the local system

Resolution:

  1. Determine the name of the queue manager
  2. Verify that the queue manager exists on the local machine, and that it is running
  3. Verify that the listener program is running
  4. Verify that queue manager trying to connect is the default queue manager
  5. If necessary, make queue manager as the default queue manager

MQRC_HOST_NOT_AVAILABLE – 2538

Connect to a queue manager but the attempt to allocate a conversation to the remote system failed.

MQRC_HOST_NOT_AVAILABLE

Reason:

  1. The listener has not been started on the remote system
  2. The connection name in the client channel definition is incorrect
  3. The network is currently unavailable
  4. A firewall blocking the port, or protocol-specific traffic
  5. The security call initializing the IBM MQ client is blocked by a security exit on the SVRCONN channel at the server

Resolution: Examine the client error log for messages explaining the cause of the problem

Here is the link of list of error codes while using IBM MQ.

Hope you found this article helpful. If you have any feedback or suggestions, please add it in our feedback portal. You can get started with monitoring IBM MQ by downloading the 30-day free trial of BizTalk360.