Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically choose output topics #692

Open
Tobo7 opened this issue Dec 17, 2024 · 2 comments
Open

How to dynamically choose output topics #692

Tobo7 opened this issue Dec 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Tobo7
Copy link

Tobo7 commented Dec 17, 2024

Is it possible to dynamically set output topic of StreamingDataFrame pipeline? I need the output topic name to be derived from message content.

Something like this: sdf.to_topic(lambda value: str(value["target_topic"]))

Native Kafka streams API supports it and its the last thing that keeps me away from using this library. https://developer.confluent.io/confluent-tutorials/dynamic-output-topic/kstreams/

Thank you!

@daniil-quix
Copy link
Collaborator

Hi @Tobo7 , thanks for creating the issue!

What you're asking about makes sense.
I'll see what it would take to implement it.

In your case, do you know the expected number of topics upfront?
Or is it completely dynamic?

@daniil-quix daniil-quix added the enhancement New feature or request label Dec 18, 2024
@Tobo7
Copy link
Author

Tobo7 commented Dec 18, 2024

In our case, approximately 50-100 topics, but the number will increase in the future.

We collect all DML changes from all database schemas and their tables into one topic. We need to split the messages into multiple topics per schema... so it's highly dynamic.

Thank you for your interest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants