Search code examples
javaapache-kafkakafka-consumer-api

How to pass topics dynamically to a kafka listener?


From a couple of days I'm trying out ways to dynamically pass topics to Kafka listener rather than using them through keys from a Java DSL. Anyone around done this before or could throw some light on what is the best way to achieve this?


Solution

  • You cannot "dynamically pass topics to Kafka listener "; you have to programmatically create a listener container instead.