Class ApacheKafkaCommitter
java.lang.Object
com.norconex.committer.core.AbstractCommitter<ApacheKafkaCommitterConfig>
com.norconex.committer.core.batch.AbstractBatchCommitter<ApacheKafkaCommitterConfig>
com.norconex.committer.apachekafka.ApacheKafkaCommitter
- All Implemented Interfaces:
BatchConsumer,Committer,Configurable<ApacheKafkaCommitterConfig>,AutoCloseable
Commits documents to Kafka via it's Producer API
Topic Creation
By default topics are assumed to already exist. You can optionally
have them created when not already present with
ApacheKafkaCommitterConfig.setCreateTopic(boolean).
- Author:
- Harinder Hanjan
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidSubclasses can perform additional closing logic by overriding this method.protected voidCommits the supplied batch.booleaninthashCode()protected voidSubclasses can perform additional initialization by overriding this method.toString()Methods inherited from class com.norconex.committer.core.batch.AbstractBatchCommitter
consume, doClean, doClose, doDelete, doInit, doUpsert, getInitializedQueueMethods inherited from class com.norconex.committer.core.AbstractCommitter
accept, applyFieldMappings, clean, close, delete, fireDebug, fireDebug, fireError, fireError, fireInfo, fireInfo, getCommitterContext, init, upsert
-
Constructor Details
-
ApacheKafkaCommitter
public ApacheKafkaCommitter()
-
-
Method Details
-
initBatchCommitter
Description copied from class:AbstractBatchCommitterSubclasses can perform additional initialization by overriding this method. Default implementation does nothing. The committer context and committer queue will be already initialized when invokingAbstractCommitter.getCommitterContext()andAbstractBatchCommitter.getInitializedQueue(), respectively.- Overrides:
initBatchCommitterin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>- Throws:
CommitterException- error initializing
-
commitBatch
Description copied from class:AbstractBatchCommitterCommits the supplied batch.- Specified by:
commitBatchin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>- Parameters:
it- the batch to commit- Throws:
CommitterException- could not commit the batch
-
closeBatchCommitter
Description copied from class:AbstractBatchCommitterSubclasses can perform additional closing logic by overriding this method. Default implementation does nothing.- Overrides:
closeBatchCommitterin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>- Throws:
CommitterException- error closing committer
-
equals
- Overrides:
equalsin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractBatchCommitter<ApacheKafkaCommitterConfig>
-
toString
- Overrides:
toStringin classAbstractBatchCommitter<ApacheKafkaCommitterConfig>
-
getConfiguration
-