Reputation: 99
I have 7 windows services for handling IBM Websphere message queues and by using each of them I get message and count. So now I need a windows service which handles all the queues of their services and retrieves the message count. Now i am connecting to those message queues separately by reading MQ details using INI File. I need a way to connect all the queues and retrieve queue depth so that i can get depth of the queues via mail.
Please help me on this..
Upvotes: 0
Views: 1117
Reputation: 15273
IBM MQ has built-in function to let applications know when a number of type of event occurs. For example when the number of messages in a queue (i.e. queue depth) reaches a certain limit or goes below a certain level, an event message is put a SYSTEM queue.. You just need to enable that functionality.
Queue depth related event messages are put to SYSTEM.ADMIN.PERFM.EVENT queue. So your application needs to listen to this queue and get messages as and when they arrive. The message will be in PCF format, hence you need to parse them accordingly.
See here for more details: http://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.mon.doc/q036420_.htm
This one is also useful: https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/websphere_mq_performance_events?lang=en
Upvotes: 0
Reputation: 1830
You could look at the sample programs provided with the MQ installation, specifically the sample for inquire:
http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q024210_.htm
By inquiring a queue you can get its depth:
http://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.adm.doc/q087810_.htm
However it's generally not a hint of a good solution design when you are trying to get depth of queues.
Upvotes: 0