There are several similar questions available on stackoverflow itself but still I am asking again because I want solution in NodeJS.
The scenario is -
(I am using kafkaJS library)
I have two topics topic-A and topic-B, so I subscribe to /topic-.*/, then topic-C is created, now I want my consumer to automatically subscribe to topic-c as well. But this is not happening.
I am getting only one solution that is, I have to stop my consumer and reinitiate it after every new topic creation.(But this approach seems tough to maintain when multiple topic will create dynamically).
Can anyone please suggest me any other solution with example. Thank you in advance.