Aiven-Open / opensearch-connector-for-apache-kafka

Aiven's OpenSearch® Connector for Apache Kafka®
Apache License 2.0
66 stars 36 forks source link

Adding index.name.override config #193

Open porto88 opened 1 year ago

porto88 commented 1 year ago

New Feature: Adding new connector configuration index.name.override which allows for defining a static index name that documents will be written to.

Current Behavior: Current logic for the index name is based off of the incoming kafka topic or data stream topic.

Problem this Solves: There currently isn't a way to change the topic with connector configuration. The only solution is to use the kafka connect transformer "org.apache.kafka.connect.transforms.RegexRouter" to remap the incoming topic(s).

The problem with this solution is when using the key.ignore.id.strategy with value of "topic.partition.offset", the topic in this key is always mapped to the static value defined by the RegexRouter, and will cause document collisions.

Proposed Solution: Add new configuration index.name.override which allows for defining a static index name that documents will be written to regardless of source topic(s).

Existing Issues: https://github.com/aiven/opensearch-connector-for-apache-kafka/issues/89