您好,我可以使用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")
答案 0 :(得分:0)
这段代码看起来很混乱:
FAT32
尝试:
destination.deleteMessages("selector")
:-)