@InterfaceStability.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.
Enum Constant and 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.
|
Modifier and Type | Method and Description |
---|---|
static KafkaSpoutConfig.ProcessingGuarantee |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KafkaSpoutConfig.ProcessingGuarantee[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KafkaSpoutConfig.ProcessingGuarantee AT_LEAST_ONCE
KafkaSpoutRetryService
. Commits synchronously on the defined
interval.public static final KafkaSpoutConfig.ProcessingGuarantee AT_MOST_ONCE
public static final KafkaSpoutConfig.ProcessingGuarantee NO_GUARANTEE
public static KafkaSpoutConfig.ProcessingGuarantee[] values()
for (KafkaSpoutConfig.ProcessingGuarantee c : KafkaSpoutConfig.ProcessingGuarantee.values()) System.out.println(c);
public static KafkaSpoutConfig.ProcessingGuarantee valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 The Apache Software Foundation. All Rights Reserved.