Class AcknowledgeMode
java.lang.Object
org.springframework.boot.autoconfigure.jms.AcknowledgeMode
Acknowledge modes for a JMS Session. Supports the acknowledge modes defined by
Session
as well as other, non-standard modes.
Note that Session.SESSION_TRANSACTED
is not defined. It should be
handled through a call to JmsAccessor.setSessionTransacted(boolean)
.
- Since:
- 3.2.0
- Author:
- Andy Wilkinson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AcknowledgeMode
Messages sent or received from the session are automatically acknowledged.static final AcknowledgeMode
Messages are acknowledged once the message listener implementation has calledMessage.acknowledge()
.static final AcknowledgeMode
Similar to auto acknowledgment except that said acknowledgment is lazy. -
Method Summary
Modifier and TypeMethodDescriptionint
getMode()
static AcknowledgeMode
Creates anAcknowledgeMode
of the givenmode
.
-
Field Details
-
AUTO
Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee. -
CLIENT
Messages are acknowledged once the message listener implementation has calledMessage.acknowledge()
. This mode gives the application (rather than the JMS provider) complete control over message acknowledgement. -
DUPS_OK
Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee.
-
-
Method Details
-
getMode
public int getMode() -
of
Creates anAcknowledgeMode
of the givenmode
. The mode may beauto
,client
,dupsok
or a non-standard acknowledge mode that can beparsed as an integer
.- Parameters:
mode
- the mode- Returns:
- the acknowledge mode
-