Enum Class AcknowledgeMode
- All Implemented Interfaces:
Serializable
,Comparable<AcknowledgeMode>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncreateAcknowledger
(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.int
Returns the acknowledgment mode.static AcknowledgeMode
Returns the enum constant of this class with the specified name.static AcknowledgeMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.withOriginalAcknowledgeMode
(int originalAcknowledgeMode) Sets the acknowledgment mode.
-
Enum Constant Details
-
ACK_AUTO
-
ACK_UNORDERED
-
ACK_RANGE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
withOriginalAcknowledgeMode
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 messagesparentSQSSession
- the associated session for the acknowledger
-