Enum Class OffsetStrategy

All Implemented Interfaces:
Serializable, Comparable<OffsetStrategy>, Constable

public enum OffsetStrategy extends Enum<OffsetStrategy>

An enum representing different strategies for committing offsets to Kafka when using KafkaListener.

To track records that have been consumed Kafka allows committing offsets at a frequency desired by the developer. This tracking is done by committing offsets for a given partition back to Kafka.

Depending on requirements you may wish the commit more or less frequently and you may not care whether the commit was successful or not. This enum allows configuring a range of policies for a Kafka consumer from leaving it down to the Kafka client (with {code AUTO}) to synchronously committing offsets after each consumer record is consumed.

Graeme Rocher