Enum Class ContainerProperties.AckMode
java.lang.Object
java.lang.Enum<ContainerProperties.AckMode>
org.springframework.kafka.listener.ContainerProperties.AckMode
- All Implemented Interfaces:
Serializable
,Comparable<ContainerProperties.AckMode>
,Constable
- Enclosing class:
- ContainerProperties
The offset commit behavior enumeration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCommit the offsets of all records returned by the previous poll after they all have been processed by the listener.Commit pending offsets afterackCount
has been exceeded.Listener is responsible for acking - use aAcknowledgingMessageListener
; acks will be queued and offsets will be committed when all the records returned by the previous poll have been processed by the listener.Listener is responsible for acking - use aAcknowledgingMessageListener
; the commit will be performed immediately if theAcknowledgment
is acknowledged on the calling consumer thread; otherwise, the acks will be queued and offsets will be committed when all the records returned by the previous poll have been processed by the listener; results will be indeterminate if you sometimes acknowledge on the calling thread and sometimes not.Commit the offset after each record is processed by the listener.Commit pending offsets afterackTime
has elapsed. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContainerProperties.AckMode
Returns the enum constant of this class with the specified name.static ContainerProperties.AckMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RECORD
Commit the offset after each record is processed by the listener. -
BATCH
Commit the offsets of all records returned by the previous poll after they all have been processed by the listener. -
TIME
Commit pending offsets afterackTime
has elapsed. -
COUNT
Commit pending offsets afterackCount
has been exceeded. -
COUNT_TIME
-
MANUAL
Listener is responsible for acking - use aAcknowledgingMessageListener
; acks will be queued and offsets will be committed when all the records returned by the previous poll have been processed by the listener. -
MANUAL_IMMEDIATE
Listener is responsible for acking - use aAcknowledgingMessageListener
; the commit will be performed immediately if theAcknowledgment
is acknowledged on the calling consumer thread; otherwise, the acks will be queued and offsets will be committed when all the records returned by the previous poll have been processed by the listener; results will be indeterminate if you sometimes acknowledge on the calling thread and sometimes not.
-
-
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
-