Enum Class AcknowledgeMode

java.lang.Object
java.lang.Enum<AcknowledgeMode>
com.amazon.sqs.javamessaging.acknowledge.AcknowledgeMode
All Implemented Interfaces:
Serializable, Comparable<AcknowledgeMode>, Constable

public enum AcknowledgeMode extends Enum<AcknowledgeMode>

Specifies the different possible modes of acknowledgment:

  • In ACK_AUTO mode, every time the user receives a message, it is acknowledged automatically. This is implemented by consumer and does not need any further processing.
  • In ACK_RANGE mode, all messages received before that message including that one are acknowledged.
  • In ACK_UNORDERED mode, messages can be acknowledged in any order one at a time. Acknowledging the consumed message does not affect other message acknowledges.
  • Enum Constant Details

  • Method Details

    • values

      public static AcknowledgeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AcknowledgeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • withOriginalAcknowledgeMode

      public AcknowledgeMode withOriginalAcknowledgeMode(int originalAcknowledgeMode)
      Sets the acknowledgment mode.
    • getOriginalAcknowledgeMode

      public int getOriginalAcknowledgeMode()
      Returns the acknowledgment mode.
    • createAcknowledger

      public Acknowledger createAcknowledger(AmazonSQSMessagingClientWrapper amazonSQSClient, SQSSession parentSQSSession)
      Creates the acknowledger associated with the session, which will be used to acknowledge the delivered messages on consumers of the session.
      Parameters:
      amazonSQSClient - the SQS client to delete messages
      parentSQSSession - the associated session for the acknowledger