【问题标题】:delete messages based on user property's using wlst根据用户属性使用 wlst 删除消息
【发布时间】:2018-09-05 05:21:28
【问题描述】:

您好,我可以使用 JMS 消息 ID 删除队列中的 JMS 消息,但无法删除基于消息的用户属性,您能帮帮我吗

connect('xxxx','xxxx','xxxxx')
servers = domainRuntimeService.getServerRuntimes();
for server in servers:
        jmsRuntime = server.getJMSRuntime();
        jmsServers = jmsRuntime.getJMSServers();
        for jmsServer in jmsServers:
             destinations = jmsServer.getDestinations();
             for destination in destinations:
                 desname=destination.getName()
                 MessagesCurrentCount=destination.getMessagesCurrentCount()
                 if MessagesCurrentCount == 0:
                         if desname == "QUEUE_RESPONSE":
#                            print 'Message Current Count  '+ str(MessagesCurrentCount) +' '
#                                        destination.deleteMessages("JMSMessageID IN('ID:<786419.1533793370330.0>')")
                                         selector = "ORDER_PRIMARY_KEY like 'jack%'";
                                          timeout = 0;
                                          destination.getMessages(selector,timeout);
                                          destination.deleteMessages("selector")

【问题讨论】:

  • 嗨,Jack,请格式化您的代码,以防止潜在的回答者出现hyphema。
  • 您好只是想知道为什么我的 getmessages 函数无法根据用户属性提取消息!!提前谢谢!!

标签: jms wlst


【解决方案1】:

这段代码看起来很可疑:

destination.deleteMessages("selector")

尝试:

destination.deleteMessages(selector)

:-)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-15
    • 2016-06-28
    相关资源
    最近更新 更多