【问题标题】:Browsing a WebSphere MQ Durable Subscription浏览 WebSphere MQ 持久订阅
【发布时间】:2011-01-31 04:19:55
【问题描述】:

这是我的情况。

我想为使用托管队列的持久订阅上的待处理消息提供浏览功能(因此我无法直接访问订阅的队列)。

如果这是一个队列,我会简单地使用类似的东西

remoteDestination = session.QueueManager.AccessQueue(
                    remoteQueueName,
                    MQC.MQOO_BROWSE                 // request browse mode
                    + MQC.MQOO_FAIL_IF_QUIESCING    // but not if MQM stopping
                    + MQC.MQOO_INQUIRE              // request inquire permissions to read stats
                    );

但是,在一个durablesub'd 主题上,没有可用的BROWSE 标志

remoteDestination = session.QueueManager.AccessTopic(
                    remoteTopicName,
                    remoteTopicObject,                    
                    MQC.MQOO_BROWSE                 //can not use an MQOO option here!!!
                    + MQC.MQSO_CREATE                 // create the topic if not already created
                    + MQC.MQSO_ANY_USERID           // allow any user to reattach to this subscription in the future
                                                    // otherwise, only the user who created the subscription can reattach
                    + MQC.MQSO_ALTER                // create (or reattach) to subscription requesting rights to make changes
                    + MQC.MQSO_FAIL_IF_QUIESCING    // if the server is shutting down, fail 
                    + MQC.MQSO_DURABLE              // the subscription is durable
                    + MQC.MQSO_MANAGED,             // the queue manager will create consup
                    "",                             // alternate user ID
                    subscriptionName                // name of the subscription
                );

太好了,我只是想知道这是否可能?我猜在重新附加之前,应用程序必须有某种方式来告诉它将要从持久订阅中消耗什么和多少消息!?

请注意,所有这些的目的是允许服务应用程序向其交互式用户显示其持久订阅中的所有“待处理”消息,以防出现故障。

提前感谢任何可以提供帮助的人!

干杯, 克里斯

【问题讨论】:

    标签: jms ibm-mq


    【解决方案1】:

    您可以查询订阅以获取关联的托管队列的名称,然后使用常规方法浏览或查询该队列。您是正确的,没有用于持久订阅的浏览 API。

    【讨论】:

    • 嘿 T.Rob。我从来没有注意到你的回复(这是在问题之后的一段时间),但它最终也是我们采取的方法。所以这实际上是我认为最好的答案!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-06
    • 2016-01-14
    • 2013-12-17
    • 1970-01-01
    相关资源
    最近更新 更多