IBM MQ 传输队列排他锁
我有一个定义了传输队列的 WebSphere MQ 队列管理器,并且我正在使用 API 来获取有关队列的一些信息。当尝试查询队列时(使用.NET接口,但我相信这在这里并不重要),我总是收到一个异常,原因是 2042: MQRC_OBJECT_IN_USE
- 根据 文档,这个意味着队列中有排他锁。通过进一步的调查,我可以看到持有锁的进程是 runmqchl
- MQ 服务器的一部分。
- 排他锁是典型的传输队列吗?
- 或者这意味着队列或传输有问题?
- 更好的是,也许有一种方法可以使用 API 对锁定队列进行一些查询(只读)(即获取其深度或浏览消息)?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SDR或SVR通道将始终打开传输队列以供独占使用。如果 .Net 客户端因此而收到错误,那么它会请求输入权限并进行查询。您可以通过使用 WMQ Explorer 查询队列来验证这一点,您将看到获取队列属性、深度等没有问题。因此打开查询但不浏览或获取,应该没问题。
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.