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
FieldsModifier and TypeFieldDescriptionstatic final AcknowledgeModeMessages sent or received from the session are automatically acknowledged.static final AcknowledgeModeMessages are acknowledged once the message listener implementation has calledMessage.acknowledge().static final AcknowledgeModeSimilar to auto acknowledgment except that said acknowledgment is lazy. -
Method Summary
Modifier and TypeMethodDescriptionintgetMode()static AcknowledgeModeCreates anAcknowledgeModeof 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 anAcknowledgeModeof the givenmode. The mode may beauto,client,dupsokor a non-standard acknowledge mode that can beparsed as an integer.- Parameters:
mode- the mode- Returns:
- the acknowledge mode
-