I have a WebSphere MQ Queue Manager with transmission queue defined and I’m using API to get some information about the queue. When trying to inquire the queue (using .NET interface, but I believe this is not important here), I always receive an exception with reason 2042: MQRC_OBJECT_IN_USE – according to the documentation, this means that there’s an exclusive lock at the queue. By some further investigation I can see that the process holding the lock is runmqchl – part of MQ Server.
- Is the exclusive lock typical for transmission queues?
- Or this means that there’s something wrong with the queue or the transmission?
- Even better, maybe there is a way to do some inquiries (read-only) to that locked queue (i.e. to get its depth or browse the messages) using API?
The SDR or SVR channel will always open the transmission queue for exclusive use. If the .Net client is getting an error because of this then it is asking for input rights as well as inquire. You can verify this by using WMQ Explorer to inquire on the queue and you will see that it has no problem getting queue attributes, depths, etc. So open for inquire but not browse or get and you should be fine.