Get IBM MQ Queue depth from C#

Karthikanbarasan
Posted by Karthikanbarasan under C# category on | Points: 40 | Views : 7973
using IBM.WMQ;
using IBM.Data.DB2;

QueueName = strQueueName;
QueueManagerName = strQueueMgrName;
ChannelInfo = strMQChannelName;

MQQueueManager queueManager = new MQQueueManager(QueueManagerName, ChannelInfo, ConnectionName);
MQQueue queue = queueManager.AccessQueue(QueueName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE);
int intQueueDepth = queue.CurrentDepth;

Comments or Responses

Login to post response