opensearch-project / opensearch-project/data-prepper

Support wildcard pattern in kafka source

Open
#3,677 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement plugin - source
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
I am trying to create a data prepper pipeline that consumes data from kafka and ingest it into opensearch.
I need to consume from a set of topics whose name is generated dynamically over time, so I don't know it in
advance. I only know that the pattern is always "my-topic-*".

Describe the solution you'd like
I saw that KafkaConsumer supports the subscription to a wildcard topic using patterns,
but it seems data prepper only uses a list of fixed topics.

Is it possible to add the possibility to also consume wildcard topics?

Describe alternatives you've considered (Optional)
I saw that logstash supports this with the topics_pattern key.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in data-prepper-plugins/kafka-plugins/src/main/java/org/opensearch/dataprepper/plugins/kafka/consumer/KafkaCustomConsumer.java around the fixed-topic subscription at line 321, then compare it with KafkaConsumer's pattern subscription documentation. Done means a pipeline can configure a wildcard topic pattern and consume topics matching it as they are created.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kafka
Domain
data-engineering, stream-processing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.