Enum PubSubStartPosition.Mode
- All Implemented Interfaces:
Serializable,Comparable<PubSubStartPosition.Mode>,java.lang.constant.Constable
- Enclosing class:
- PubSubStartPosition
PubSubStartPosition names.
toString() returns the hyphenated spelling rather than the constant name, because
that spelling is what a SQL WITH clause is written in: Flink resolves an enum
ConfigOption by matching the configured value against toString(), case-insensitively
and with no other normalization. Flink's own DeliveryGuarantee carries its option
spelling the same way.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStarts wherever the subscription already is, delivering whatever it has not acknowledged.Starts from the oldest message the subscription still holds, replaying its whole retained backlog.Starts from messages published after the job starts, discarding the existing backlog by marking it acknowledged.Starts from a given instant: messages published before it are marked acknowledged, those published after it unacknowledged. -
Method Summary
Modifier and TypeMethodDescriptiontoString()static PubSubStartPosition.ModeReturns the enum constant of this type with the specified name.static PubSubStartPosition.Mode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CONTINUE_FROM_SUBSCRIPTION
Starts wherever the subscription already is, delivering whatever it has not acknowledged. The default, and the only mode that issues no seek and so leaves other consumers alone. -
EARLIEST_RETAINED
Starts from the oldest message the subscription still holds, replaying its whole retained backlog.How far back that reaches is a property of the subscription, not of this setting: acknowledged messages are only replayable if the subscription retains them or its topic does. Against a subscription with neither, this recovers only what was never acknowledged.
-
LATEST
Starts from messages published after the job starts, discarding the existing backlog by marking it acknowledged.This drops data — everything already in the subscription. It also resolves against the clock at the moment the seek runs, so it is the one mode that is not reproducible: a failover before the source assigns any split seeks again, to a later instant, discarding whatever arrived in between.
-
TIMESTAMP
Starts from a given instant: messages published before it are marked acknowledged, those published after it unacknowledged. Subject to the same retention limits asEARLIEST_RETAINEDwhen the instant is in the past.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<PubSubStartPosition.Mode>
-