OffsetGapPolicy

What a read of a Kafka partition does when the offset it is to read from is not in the partition: before its earliest retained offset (the topic's retention deleted what the checkpoint had yet to read), or past its end (the topic was deleted and created again, or truncated). Either way messages were lost, and the read never steps over them silently: whatever the policy, it logs an error, counts the gap (KafkaPartitionedSource.offsetGaps) and tells the node's observer of it (ObservedEvent.OffsetGap).

Entries

Link copied to clipboard

The read fails with an OffsetGapException (the default). A subscription retries its read with its backoff, logging each failure, so it stays where it is, parked in effect. Once the loss is understood, the recovery is to set wow.kafka.offset-gap=earliest and restart the node: the read resumes from the earliest retained offset, and the skipped range is lost to that subscription and stays counted.

Link copied to clipboard

The read goes on from the earliest offset the partition retains, knowingly skipping the messages lost.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.