|Enum Constant and Description|
Semantic.AT_LEAST_ONCE the Flink producer will wait for all outstanding messages in the Kafka buffers to be acknowledged by the Kafka producer on a checkpoint.
Semantic.EXACTLY_ONCE the Flink producer will write all messages in a Kafka transaction that will be committed to Kafka on a checkpoint.
Semantic.NONE means that nothing will be guaranteed.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final FlinkKafkaProducer.Semantic EXACTLY_ONCE
In this mode
FlinkKafkaProducer sets up a pool of
FlinkKafkaInternalProducer. Between each checkpoint a Kafka transaction is created,
which is committed on
checkpoint complete notifications are running late,
FlinkKafkaProducer can run
FlinkKafkaInternalProducers in the pool. In that case any subsequent
FlinkKafkaProducer.snapshotState(FunctionSnapshotContext) requests will fail and
FlinkKafkaProducer will keep using the
the previous checkpoint. To decrease the chance of failing checkpoints there are four
public static final FlinkKafkaProducer.Semantic AT_LEAST_ONCE
public static final FlinkKafkaProducer.Semantic NONE
public static FlinkKafkaProducer.Semantic values()
for (FlinkKafkaProducer.Semantic c : FlinkKafkaProducer.Semantic.values()) System.out.println(c);
public static FlinkKafkaProducer.Semantic valueOf(String name)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.