0
Reply

How can I check if the MQ is up or down with sample message

Sreenath G

Sreenath G

Jul 14 2011 1:29 PM
1.4k
 

Hi,

I am using the following code to check for MQ Manager upstatus.

IBM.WMQ.MQQueueManager lObjMQManager = new IBM.WMQ.MQQueueManager(lStrQueueManagerName, lStrChannelName, lStrConnName);

 

                    if (lObjMQManager.OpenStatus == true)

                    {

                        lBoonIsConnected = true;

                        lObjMQManager.Disconnect();

                        lObjMQManager.Close();

                        lObjMQManager = null;

                    }

                    else

                    {

                        lBoonIsConnected = false;

                    }

 

But I want to know whether Queue is up or not. How can I achive this. Is there any sample message that I can send and check like below…

lObjQueue.Put(lObjQueueMessage, lObjQueuePutMessageOptions);

 

is there any way for this..

Please help.

Thanks

Sreenath