Class AutoOffsetReset
java.lang.Object
org.apache.kafka.streams.AutoOffsetReset
Sets the
auto.offset.reset configuration when adding a source processor or when creating KStream or KTable via StreamsBuilder.Method Summary
Modifier and TypeMethodDescriptionstatic AutoOffsetResetbyDuration(Duration duration) Creates anAutoOffsetResetinstance for the specified reset duration.static AutoOffsetResetearliest()Creates anAutoOffsetResetinstance representing "earliest".booleaninthashCode()static AutoOffsetResetlatest()Creates anAutoOffsetResetinstance representing "latest".static AutoOffsetResetnone()Creates anAutoOffsetResetinstance representing "none".
Method Details
none
Creates anAutoOffsetResetinstance representing "none".- Returns:
- An
AutoOffsetResetinstance for no reset.
earliest
Creates anAutoOffsetResetinstance representing "earliest".- Returns:
- An
AutoOffsetResetinstance for the "earliest" offset.
latest
Creates anAutoOffsetResetinstance representing "latest".- Returns:
- An
AutoOffsetResetinstance for the "latest" offset.
byDuration
Creates anAutoOffsetResetinstance for the specified reset duration.- Parameters:
duration- The duration to use for the offset reset; must be non-negative.- Returns:
- An
AutoOffsetResetinstance with the specified duration. - Throws:
IllegalArgumentException- If the duration is negative.
equals
hashCode