Package io.confluent.parallelconsumer
Enum ParallelConsumerOptions.CommitMode
java.lang.Object
java.lang.Enum<ParallelConsumerOptions.CommitMode>
io.confluent.parallelconsumer.ParallelConsumerOptions.CommitMode
- All Implemented Interfaces:
Serializable,Comparable<ParallelConsumerOptions.CommitMode>,Constable
- Enclosing class:
- ParallelConsumerOptions<K,V>
public static enum ParallelConsumerOptions.CommitMode extends Enum<ParallelConsumerOptions.CommitMode>
The type of commit to be made, with either a transactions configured Producer where messages produced are
committed back to the Broker along with the offsets they originated from, or with the faster simpler Consumer
offset system either synchronously or asynchronously
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description PERIODIC_CONSUMER_ASYNCHRONOUSPeriodically commits offsets asynchronously.PERIODIC_CONSUMER_SYNCPeriodically synchronous commits with the Consumer.PERIODIC_TRANSACTIONAL_PRODUCERPeriodically commits through the Producer using transactions. -
Method Summary
Modifier and Type Method Description static ParallelConsumerOptions.CommitModevalueOf(String name)Returns the enum constant of this type with the specified name.static ParallelConsumerOptions.CommitMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PERIODIC_TRANSACTIONAL_PRODUCER
Periodically commits through the Producer using transactions. Slowest of the options, but no duplicates in Kafka guaranteed (message replay may cause duplicates in external systems which is unavoidable with Kafka).This is separate from using an IDEMPOTENT Producer, which can be used, along with
PERIODIC_CONSUMER_SYNCorPERIODIC_CONSUMER_ASYNCHRONOUS. -
PERIODIC_CONSUMER_SYNC
Periodically synchronous commits with the Consumer. Much faster thanPERIODIC_TRANSACTIONAL_PRODUCER. Slower but potentially less duplicates thanPERIODIC_CONSUMER_ASYNCHRONOUSupon replay. -
PERIODIC_CONSUMER_ASYNCHRONOUS
Periodically commits offsets asynchronously. The fastest option, under normal conditions will have few or no duplicates. Under failure recovery may have more duplicates thanPERIODIC_CONSUMER_SYNC.
-
-
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
-