public enum AcknowledgeMode extends java.lang.Enum<AcknowledgeMode>
Enum Constant and Description |
---|
AUTO
Auto - the container will issue the ack/nack based on whether
the listener returns normally, or throws an exception.
|
MANUAL
Manual acks - user must ack/nack via a channel aware listener.
|
NONE
No acks -
autoAck=true in Channel.basicConsume() . |
Modifier and Type | Method and Description |
---|---|
boolean |
isAutoAck()
Return if the mode is
NONE (which is called autoAck
in RabbitMQ). |
boolean |
isManual()
Return true if the mode is
MANUAL . |
boolean |
isTransactionAllowed()
|
static AcknowledgeMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AcknowledgeMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AcknowledgeMode NONE
autoAck=true
in Channel.basicConsume()
.public static final AcknowledgeMode MANUAL
public static final AcknowledgeMode AUTO
Do not confuse with RabbitMQ autoAck
which is
represented by NONE
here.
public static AcknowledgeMode[] values()
for (AcknowledgeMode c : AcknowledgeMode.values()) System.out.println(c);
public static AcknowledgeMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isTransactionAllowed()
public boolean isAutoAck()
NONE
(which is called autoAck
in RabbitMQ).NONE
.public boolean isManual()
MANUAL
.