IBM MQ getCurrentDepth需要accessQueue [英] IBM MQ getCurrentDepth requires accessQueue

查看:252
本文介绍了IBM MQ getCurrentDepth需要accessQueue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想获取mq深度并且使用getCurrentDepth时,我注意到它不适用于存储/缓存的mq队列对象.
我需要一个新"队列对象,并且需要执行accessQueue方法调用,获取该队列,并在该对象上使用getCurrentDepth方法.否则,深度始终为零.

When I want to get mq depth, and I use getCurrentDepth I notice it doesn't work on a stored/cached mq queue object.
I need a 'fresh' queue object and I need to do an accessQueue method call, get the queue and the use the getCurrentDepth method on that object. Otherwise, the depth is always zero.

我没有发现有关此行为的任何公开问题/文档.

I didn't find any open questions/documentation around this behavior.

我在Linux上将MQ客户端用于Java 7.0版. 我的打开选项是:MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING 并且我使用SSL连接.

I'm using the MQ client for java version 7.0 on linux. My open options are: MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING and I use an SSL connection.

谢谢!

推荐答案

我注意到它不适用于存储/缓存的mq队列对象.

I notice it doesn't work on a stored/cached mq queue object.

没有诸如存储/缓存的MQ队列对象之类的东西.队列类型为:本地,远程,别名群集.

There is no such thing as stored/cached MQ queue object. The queue types are: local, remote, alias cluster.

我需要一个新"队列对象

I need a 'fresh' queue object

没有这样的概念来刷新队列对象.

There is no such concept of fresh (refresh) the queue object.

getCurrentDepth方法属于MQQueue类.因此,您需要使用MQQueueManager类的accessQueue方法访问队列.

The getCurrentDepth method belongs to the MQQueue class. Therefore, you need to access the queue using the accessQueue method of the MQQueueManager class.

最后,永远不需要在MQ应用程序中使用getCurrentDepth方法.您要么收到一条消息,要么循环执行,直到抛出带有MQRC_NO_MSG_AVAILABLE(2033)原因码的MQException.

Finally, there should NEVER be a need to use the getCurrentDepth method in an MQ application. You either get a single message or loop until an MQException is thrown with MQRC_NO_MSG_AVAILABLE (2033) reason code.

这篇关于IBM MQ getCurrentDepth需要accessQueue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆