快速业务通道

关于weblogic中jms message的状态 - 编程入门网

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-21

关于weblogic中jms message的状态

时间:2011-01-07 BlogJava 走走停停又三年

今天同事问我说,如何处理RECEIVE、VISIBLE的JMS消息?有点懵,之前从没有关注过消息的状态。Weblogic81中,我们是不能看到 destination中的消息的,只能看到当前destination中,有多少message, 有多少pending的message。而92中,我们监控destination的时候,可以看到具体的message,而且message后面会跟一个state string。标题中说的RECEIVE、VISIBLE就是这个state string,其实state有很多,常见的也就是RECEIVE、VISIBLE。下面我们看看所有这些STATE在代码(MessageInfo.java)中的解释,

VISIBLE:Indicates that the message is visible on the destination.消息已经入列,等待被消费。

ORDERED:Indicates that the message belongs to a Unit of Order. 消息处于某个unit中。

DELAYED:Indicates that the message exists on the destination but is classified as pending because it has a scheduled delivery time or is delayed. 消息已经入列,但因为TimeToDeliver还没有到,直到TimeToDeliver,该消息才会变成VISIBLE。或者由于客户端消费异常,比如onMessage中出现了RuntimeException,消息被recover后,等待Redelivery Delay时间到达,然后重新发送。

RECEIVE:Indicates that the message exists on the destination but is classified as pending because it has been received but not acknowledged. The actual state may also include STATE_TRANSACTION if the receive operation was performed as part of a transaction.消息已经入列,且已经被DELIVER到某个CONSUMER,但CONSUMER的ACKNOWLEDGE还没有收到。可能是网络问题或客户端设为CLIENT_ACK模式。

SEND:Indicates that the message exists on the destination but is classified as pending because it is part of a send operation that is in progress. The actual state may also include STATE_TRANSACTION if the send operation was perfromed as part of a transaction.消息已经入列,但目前send操作正在处理中(比如事务未提交),该消息对于consumer是不可用的。

TRANSACTION:Indicates that the message exists on the destination but is classified as pending because it is part of a send or receive operation that is being performed as part of a global transaction.

PAUSED:Indicates that the message exists on the destination but is being held in a pending state because of a pause operation. 消息因为PAUSE被PENDING在DEST中。

REDELIVERY_COUNT_EXCEEDED:Indicates that the message has exceeded the redelivery count set for the destination and is no longer available for consumption. 消息反复REDELIVERY的上限已经到达,这样的消息不会被重发。

根据消息的状态,我们基本可以断定JMS消息相关问题的位置,从而调查可以做到有的放矢。

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号