|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.jms Interface DeliveryMode
public interface DeliveryMode
JMS API 支持的传送模式是
PERSISTENT
和 NON_PERSISTENT
。
如果客户端感觉若该消息在传输中丢失,应用程序就会发生问题,它就将消息标记为持久。如果偶然丢失消息是可容忍的,则客户端将消息标记为非持久。客户端使用传送模式告知 JMS 提供者如何在消息传输可靠性和吞吐量之间保持平衡。
传送模式仅包含消息到其目的地的传输。PERSISTENT
传送模式不保证在确认消息接收者之前将消息保留在目的地。客户端应该假定已通过管理方式设置了消息保留策略。消息保留策略管理从目的地到消息使用方的消息传送的可靠性。例如,如果客户端的消息存储空间已耗尽,则依据特定于站点的消息保留策略,某些消息可能被丢弃。
如果消息的传送模式是 PERSISTENT
并且如果目的地有充分的消息保留策略,则可以保证消息由 JMS 提供者传送一次并且只传送一次。
version |
|
The delivery modes supported by the JMS API are PERSISTENT
and
NON_PERSISTENT
.
A client marks a message as persistent if it feels that the application will have problems if the message is lost in transit. A client marks a message as non-persistent if an occasional lost message is tolerable. Clients use delivery mode to tell a JMS provider how to balance message transport reliability with throughput.
Delivery mode covers only the transport of the message to its
destination. Retention of a message at the destination until
its receipt is acknowledged is not guaranteed by a PERSISTENT
delivery mode. Clients should assume that message retention
policies are set administratively. Message retention policy
governs the reliability of message delivery from destination
to message consumer. For example, if a client's message storage
space is exhausted, some messages may be dropped in accordance with
a site-specific message retention policy.
A message is guaranteed to be delivered once and only once
by a JMS provider if the delivery mode of the message is
PERSISTENT
and if the destination has a sufficient message retention policy.
- Version:
- 1.0 - 7 August 1998
- Author:
- Mark Hapner, Rich Burridge
Field Summary | |
---|---|
static int |
NON_PERSISTENT
This is the lowest-overhead delivery mode because it does not require that the message be logged to stable storage. |
static int |
PERSISTENT
This delivery mode instructs the JMS provider to log the message to stable storage as part of the client's send operation. |
Field Detail |
---|
英文文档:
NON_PERSISTENT
static final int NON_PERSISTENT
- This is the lowest-overhead delivery mode because it does not require
that the message be logged to stable storage. The level of JMS provider
failure that causes a
NON_PERSISTENT
message to be lost is not defined.A JMS provider must deliver a
NON_PERSISTENT
message with an at-most-once guarantee. This means that it may lose the message, but it must not deliver it twice.- See Also:
- Constant Field Values
英文文档:
PERSISTENT
static final int PERSISTENT
- This delivery mode instructs the JMS provider to log the message to stable
storage as part of the client's send operation. Only a hard media
failure should cause a
PERSISTENT
message to be lost.- See Also:
- Constant Field Values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!