Enum Class DeduplicationMode

java.lang.Object
java.lang.Enum<DeduplicationMode>
dev.restate.ingestion.v1.DeduplicationMode
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<DeduplicationMode>, Constable

public enum DeduplicationMode extends Enum<DeduplicationMode> implements com.google.protobuf.ProtocolMessageEnum
How the server deduplicates the records of a stream.

The mode is fixed for the lifetime of the stream: it is chosen once in the
`Start` frame and cannot be changed by a later `IngestionDefaults` frame.

Note that this only controls deduplication. Regardless of the mode, every
`Invocation` must still carry an `offset`, offsets must still increase
monotonically within a stream, and `Response.last_committed` still reports
progress in terms of those offsets.
Protobuf enum dev.restate.ingress.ingestion.v1.DeduplicationMode
  • Enum Constant Details

    • DISABLED

      public static final DeduplicationMode DISABLED
      Disable deduplication: every record accepted by the server becomes an
      invocation.
      
      Nothing is tracked across streams, so resending records after a
      reconnect duplicates them. Pick this mode only when the producer cannot
      supply a stable ID, or when duplicates are acceptable or already
      suppressed elsewhere (for example by an `idempotency_key`).
      
      `producer_id` is optional in this mode, but is still recorded on traces
      and metrics when set.
      
      DISABLED = 0;
    • OFFSET_BASED

      public static final DeduplicationMode OFFSET_BASED
      Deduplicate on `(producer_id, offset)`.
      
      The server tracks the highest committed offset per producer ID and
      silently drops any record whose offset is not above it, which makes
      resending a range of records after a reconnect safe: records the server
      already committed do not become duplicate invocations.
      
      This mode requires `producer_id` to be set; using it with an empty
      producer ID fails the stream with `GO_AWAY`. It also requires the
      producer to reuse the same ID across streams, since a new ID starts
      from a fresh deduplication state.
      
      OFFSET_BASED = 1;
    • UNRECOGNIZED

      public static final DeduplicationMode UNRECOGNIZED
  • Field Details

    • DISABLED_VALUE

      public static final int DISABLED_VALUE
      Disable deduplication: every record accepted by the server becomes an
      invocation.
      
      Nothing is tracked across streams, so resending records after a
      reconnect duplicates them. Pick this mode only when the producer cannot
      supply a stable ID, or when duplicates are acceptable or already
      suppressed elsewhere (for example by an `idempotency_key`).
      
      `producer_id` is optional in this mode, but is still recorded on traces
      and metrics when set.
      
      DISABLED = 0;
      See Also:
    • OFFSET_BASED_VALUE

      public static final int OFFSET_BASED_VALUE
      Deduplicate on `(producer_id, offset)`.
      
      The server tracks the highest committed offset per producer ID and
      silently drops any record whose offset is not above it, which makes
      resending a range of records after a reconnect safe: records the server
      already committed do not become duplicate invocations.
      
      This mode requires `producer_id` to be set; using it with an empty
      producer ID fails the stream with `GO_AWAY`. It also requires the
      producer to reuse the same ID across streams, since a new ID starts
      from a fresh deduplication state.
      
      OFFSET_BASED = 1;
      See Also:
  • Method Details

    • values

      public static DeduplicationMode[] 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

      public static DeduplicationMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static DeduplicationMode valueOf(int value)
      Deprecated.
      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:
      value - 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 name
      NullPointerException - if the argument is null
    • forNumber

      public static DeduplicationMode forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<DeduplicationMode> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static DeduplicationMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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:
      desc - 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 name
      NullPointerException - if the argument is null