Create topic at run time

hi everyone
is there a way to create topics at runtime in spring boot app?

Hi Mohamed,

Check out Spring’s TopicBuilder - TopicBuilder (Spring for Apache Kafka 2.9.0 API)

There’s also a good article about it here: Programmatically create Kafka topics using Spring Kafka | by Tim van Baarsen | Medium

I hope that helps,
Dave

Thx a lot for responding but of course I saw this article as I already did research before asking

Thx for your help but this’s not my case

I’ll investigate again or even change the design so may be I’ll send u another email xD

image001.jpg

hey @mohamed.ibrahim, perhaps you can share the research you’ve done as part of your question, so that people don’t inadvertently duplicate it in trying to help? You could also share the code that you’ve got so far and let us know in what way it’s not working.