Class AcknowledgeMode

java.lang.Object
org.springframework.boot.autoconfigure.jms.AcknowledgeMode

public final class AcknowledgeMode extends Object
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 Details

    • AUTO

      public static final AcknowledgeMode AUTO
      Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee.
    • CLIENT

      public static final AcknowledgeMode CLIENT
      Messages are acknowledged once the message listener implementation has called Message.acknowledge(). This mode gives the application (rather than the JMS provider) complete control over message acknowledgement.
    • DUPS_OK

      public static final AcknowledgeMode 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

      public static AcknowledgeMode of(String mode)
      Creates an AcknowledgeMode of the given mode. The mode may be auto, client, dupsok or a non-standard acknowledge mode that can be parsed as an integer.
      Parameters:
      mode - the mode
      Returns:
      the acknowledge mode