Configuration Options¶
Connector¶
connection.urlList of Elasticsearch HTTP connection URLs e.g.
http://eshost1:9200,http://eshost2:9200.- Type: list
- Importance: high
batch.sizeThe number of records to process as a batch when writing to Elasticsearch.
- Type: int
- Default: 2000
- Importance: medium
max.buffered.recordsThe maximum number of records each task will buffer before blocking acceptance of more records. This config can be used to limit the memory usage for each task.
- Type: int
- Default: 20000
- Importance: low
linger.msLinger time in milliseconds for batching.
Records that arrive in between request transmissions are batched into a single bulk indexing request, based on the
batch.sizeconfiguration. Normally this only occurs under load when records arrive faster than they can be sent out. However it may be desirable to reduce the number of requests even under light load and benefit from bulk indexing. This setting helps accomplish that - when a pending batch is not full, rather than immediately sending it out the task will wait up to the given delay to allow other records to be added so that they can be batched into a single request.- Type: long
- Default: 1
- Importance: low
max.in.flight.requestsThe maximum number of indexing requests that can be in-flight to Elasticsearch before blocking further requests.
- Type: int
- Default: 5
- Importance: medium
flush.timeout.msThe timeout in milliseconds to use for periodic flushing, and when waiting for buffer space to be made available by completed requests as records are added. If this timeout is exceeded the task will fail.
- Type: long
- Default: 10000
- Importance: low
max.retriesThe maximum number of retries that are allowed for failed indexing requests. If the retry attempts are exhausted the task will fail.
- Type: int
- Default: 5
- Importance: low
retry.backoff.msHow long to wait in milliseconds before attempting the first retry of a failed indexing request. Upon a failure, this connector may wait up to twice as long as the previous wait, up to the maximum number of retries. This avoids retrying in a tight loop under failure scenarios.
- Type: long
- Default: 100
- Importance: low
Data Conversion¶
type.nameThe Elasticsearch type name to use when indexing.
- Type: string
- Importance: high
key.ignoreWhether to ignore the record key for the purpose of forming the Elasticsearch document ID. When this is set to
true, document IDs will be generated as the record’stopic+partition+offset.Note that this is a global config that applies to all topics, usetopic.key.ignoreto override astruefor specific topics.- Type: boolean
- Default: false
- Importance: high
schema.ignoreWhether to ignore schemas during indexing. When this is set to
true, the record schema will be ignored for the purpose of registering an Elasticsearch mapping. Elasticsearch will infer the mapping from the data (dynamic mapping needs to be enabled by the user).Note that this is a global config that applies to all topics, usetopic.schema.ignoreto override astruefor specific topics.- Type: boolean
- Default: false
- Importance: low
compact.map.entriesDefines how map entries with string keys within record values should be written to JSON. When this is set to
true, these entries are written compactly as"entryKey": "entryValue". Otherwise, map entries with string keys are written as a nested document{"key": "entryKey", "value": "entryValue"}. All map entries with non-string keys are always written as nested documents. Prior to 3.3.0, this connector always wrote map entries as nested documents, so set this tofalseto use that older behavior.- Type: boolean
- Default: true
- Importance: low
topic.index.mapA map from Kafka topic name to the destination Elasticsearch index, represented as a list of
topic:indexpairs.- Type: list
- Default: “”
- Importance: low
topic.key.ignoreList of topics for which
key.ignoreshould betrue.- Type: list
- Default: “”
- Importance: low
topic.schema.ignoreList of topics for which
schema.ignoreshould betrue.- Type: list
- Default: “”
- Importance: low
drop.invalid.messageWhether to drop kafka message when it cannot be converted to output message.
- Type: boolean
- Default: false
- Importance: low