Package org.springframework.amqp.core
Enum Class AcknowledgeMode
- All Implemented Interfaces:
Serializable
,Comparable<AcknowledgeMode>
,Constable
Acknowledgment modes supported by the listener container.
- Author:
- Dave Syer, Gary Russell
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return if the mode isNONE
(which is calledautoAck
in RabbitMQ).boolean
isManual()
Return true if the mode isMANUAL
.boolean
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.
-
Enum Constant Details
-
NONE
No acks -autoAck=true
inChannel.basicConsume()
. -
MANUAL
Manual acks - user must ack/nack via a channel aware listener. -
AUTO
Auto - the container will issue the ack/nack based on whether the listener returns normally, or throws an exception.Do not confuse with RabbitMQ
autoAck
which is represented byNONE
here.
-
-
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
-
isTransactionAllowed
public boolean isTransactionAllowed()- Returns:
- true if transactions are allowed.
-
isAutoAck
public boolean isAutoAck()Return if the mode isNONE
(which is calledautoAck
in RabbitMQ).- Returns:
- true if the mode is
NONE
.
-
isManual
public boolean isManual()Return true if the mode isMANUAL
.- Returns:
- true if manual.
-