Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to monitor an existing queue from WebSphere MQ?

Tags:

ibm-mq

I have a .NET application that needs to monitor a queue in WebSphere MQ. I need to react to each message without impacting the current process. The client application can't explicity send me the same message.

Can I read a message without removing it from the queue? Can I be notified for each message? Can I configure the MQ to duplicate the current queue?

Is there another solution?

like image 973
Jorge Avatar asked Oct 14 '22 04:10

Jorge


1 Answers

If you are using WMQ v7 then you can do this without any impact to the existing applications other than to change the queue name for one of them.

Currently the message producer and consumer use the same queue. In v7 of WMQ you can create an alias over a topic so that the message producer thinks it's a queue. Then you can create two administrative, durable subscriptions such that one points to the existing input queue and another points to a queue dedicated to your new application.

Of course you are already using v7 since v6 goes out of service next year, right? You can upgrade the QMgr to v7 which enables this behavior while still using v6 client code for the apps.

If you are using WMQ v6 then the MirrorQ program might work for you.

like image 91
T.Rob Avatar answered Oct 18 '22 15:10

T.Rob