All consumed JMS messages support the Acknowledge
method for use when a client has specified that its JMS session's consumed messages are to be explicitly acknowledged. By invoking Acknowledge
on a consumed message, a client acknowledges all messages consumed by the session that the message was delivered to.
Calls to Acknowledge
are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes.
A client may individually Acknowledge each message as it is consumed, or it may choose to Acknowledge messages as an application-defined group (which is done by calling Acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.)
WebLogic provides an optional extension that is configurable on the connection factory which controls acknowledge behavior: the acknowledge policy can be set to "acknowledge all", or "acknowledge previous", where "acknowledge previous" is an extension that causes calls acknowledges to only acknowledge messages up to and including the current message instead of all of a session's unacknowledged messages.
A client may individually Acknowledge each message as it is consumed, or it may choose to Acknowledge messages as an application-defined group (which is done by calling Acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.)
Messages that have been received but not acknowledged may be redelivered.
Exception Type | Condition |
---|---|
MessageException | if JMS fails to Acknowledge the messages due to some internal error. |
IllegalStateException | if this method is called on a closed session. |
IMessage Interface | WebLogic.Messaging Namespace | CLIENT_ACKNOWLEDGE | ISession.Recover