Skip to main content

ApacheKafkaCommitter

Commit documents to Apache Kafka.

committer/apachekafkaJavadoc: ApacheKafkaCommitter

Notesโ€‹

Commits crawled documents to an Apache Kafka topic. Supports optional topic creation, field mappings to Kafka fields, and configurable partition and replication settings.

Interoperability note:

  • ApacheKafkaCommitter provides Kafka-based interoperability out of the box by publishing crawl output to an open event bus.
  • This allows downstream integration with a wide range of systems through Kafka-native consumers and connector ecosystems.
  • Downstream behavior (for example schema mapping, delete semantics, idempotency, and ACL handling) depends on the target consumer/connector configuration and capabilities.

Examplesโ€‹

The following example uses the minimum required settings to configure Apache Kafka Committer. The Kafka topic won't be created. As such, the topic must already exist in Apache Kafka.

class: ApacheKafkaCommitter
bootstrapServers: http://some_host:1234
topicName: my-topic

Usageโ€‹

Full configuration skeleton, with every option and its default
class: ApacheKafkaCommitter
bootstrapServers: string
createTopic: false
fieldMappings: {}
partitions: 0
queue:
class: FsQueue
batchSize: 0
commitLeftoversOnInit: false
maxPerFolder: 0
onCommitFailure:
ignoreErrors: false
maxRetries: 0
retryDelay: 0
splitBatch: OFF
replicationFactor: 0
restrictions:
- fieldMatcher: {}
valueMatcher: {}
topicName: string

Propertiesโ€‹

PropertyTypeRequiredDefault
bootstrapServersstringNo-
createTopicbooleanNofalse
fieldMappingsRecord<string, string>No-
partitionsintegerNo0
queueCommitterQueueNoFsQueue
replicationFactorintegerNo0
restrictionsPropertyMatcher[]No-
topicNamestringNo-

Property Detailsโ€‹

bootstrapServersโ€‹

A list of host/port pairs in the form host1:port1,host2:port2,... to use for establishing a connection to the Kafka cluster.

createTopicโ€‹

Create the "Topic Name" in Kafka if it does not exist already.

fieldMappingsโ€‹

Mapping of source fields to target ones (Kafka fields).

partitionsโ€‹

Number of partitions set at topic creation.

queueโ€‹

Configures the committer queue used to batch documents before sending them to the target system. Adjust queue settings to tune throughput and memory usage.

replicationFactorโ€‹

Replication factor set at topic creation.

restrictionsโ€‹

Defines filter conditions that restrict which documents this committer processes. Documents not matching the restrictions are ignored by this committer.

topicNameโ€‹

The Kafka topic name to possibly create and use as the target for storing documents.