Package org.apache.storm.kafka.spout

# Enum Class KafkaSpoutConfig.ProcessingGuarantee

java.lang.Object
java.lang.Enum<KafkaSpoutConfig.ProcessingGuarantee>
org.apache.storm.kafka.spout.KafkaSpoutConfig.ProcessingGuarantee

All Implemented Interfaces:
  `Serializable`, `Comparable<KafkaSpoutConfig.ProcessingGuarantee>`, `Constable`

Enclosing class:
  KafkaSpoutConfig<K,V>

@Unstable public static enum KafkaSpoutConfig.ProcessingGuarantee extends Enum<KafkaSpoutConfig.ProcessingGuarantee>
This enum controls when the tuple with the `ConsumerRecord` for an offset is marked as processed, i.e. when the offset can be committed to Kafka. The default value is AT_LEAST_ONCE. The commit interval is controlled by `KafkaSpoutConfig.getOffsetsCommitPeriodMs()`, if the mode commits on an interval. NO_GUARANTEE may be removed in a later release without warning, we're still evaluating whether it makes sense to keep.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AT_LEAST_ONCE`
  An offset is ready to commit only after the corresponding tuple has been processed and acked (at least once).
  `AT_MOST_ONCE`
  Every offset will be synchronously committed to Kafka right after being polled but before being emitted to the downstream components of the topology.
  `NO_GUARANTEE`
  The polled offsets are ready to commit immediately after being polled.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static KafkaSpoutConfig.ProcessingGuarantee`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static KafkaSpoutConfig.ProcessingGuarantee[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### AT_LEAST_ONCE

    public static final KafkaSpoutConfig.ProcessingGuarantee AT_LEAST_ONCE
    An offset is ready to commit only after the corresponding tuple has been processed and acked (at least once). If a tuple fails or times out it will be re-emitted, as controlled by the `KafkaSpoutRetryService`. Commits synchronously on the defined interval.

  - ### AT_MOST_ONCE

    public static final KafkaSpoutConfig.ProcessingGuarantee AT_MOST_ONCE
    Every offset will be synchronously committed to Kafka right after being polled but before being emitted to the downstream components of the topology. The commit interval is ignored. This mode guarantees that the offset is processed at most once by ensuring the spout won't retry tuples that fail or time out after the commit to Kafka has been done

  - ### NO_GUARANTEE

    public static final KafkaSpoutConfig.ProcessingGuarantee NO_GUARANTEE
    The polled offsets are ready to commit immediately after being polled. The offsets are committed periodically, i.e. a message may be processed 0, 1 or more times. This behavior is similar to setting enable.auto.commit=true in the consumer, but allows the spout to control when commits occur. Commits asynchronously on the defined interval.

- ## Method Details

  - ### values

    public static KafkaSpoutConfig.ProcessingGuarantee[] 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 KafkaSpoutConfig.ProcessingGuarantee 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