confluentinc / kafka-connect-elasticsearch

Kafka Connect Elasticsearch connector
Other
15 stars 436 forks source link

add 'data.stream.namespace' configuration property #742

Open fbaligand opened 10 months ago

fbaligand commented 10 months ago

Problem

Currently, we cannot fully customize the target data stream. More precisely, the namespace part of the data stream is necessarily the topic. This is especially a problem, when you want that a connector consumes several topics for only one target data stream. More simply, I want to be able to define target data stream name, regardless of the input topic name.

Solution

This PR aims to add a new configuration property named 'data.stream.namespace'. This property aims to customize data stream "namespace" part (as its name says). This is an optional setting, that have ${topic} as default value ; so that, by default, it works as currently, no breaking change. By the way, user is able to define a custom namespace that contains topic name like that: my_prefix_${topic}

Does this solution apply anywhere else?
If yes, where?

Test Strategy

Testing done:

Release Plan

I guess that you (Confluent Inc.) is responsible for release plan.

I am merging to master

It is safe to revert or rollback
cla-assistant[bot] commented 10 months ago

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] commented 10 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

michele-brambilla commented 1 week ago

I might be a bit naive, but can't the same result be achieved using the RegExRouter SMT?