Re: list of pattern processed topic list

2019-08-20 Thread Matthias J. Sax
#listTopic() is not related to your subscription/assignment as indicated by its JavaDocs: > Get metadata about partitions for all topics that the user is authorized to > view. This method will issue a > remote call to the server. -Matthias On 8/19/19 7:02 AM, Kamal Chandraprakash wrote: > You

Re: list of pattern processed topic list

2019-08-19 Thread Kamal Chandraprakash
You can use the KafkaConsumer#assignment() method to get all the assigned topic-partitions for that consumer instance. But, you've to periodically call poll method to get the latest assignment which may return records. This shortcoming is actively discussed in the below threads. https://mail-archi

Re: list of pattern processed topic list

2019-08-19 Thread M. Manna
Kafka doesn’t have regex subscription. You could get a list of available topic using admin client. From there, you can decide what topics you would like to subscribe to (or process using your logic). Check documentation for AdminClient.listTopics and ListTopicResult holder. I hope this helps. Re

list of pattern processed topic list

2019-08-19 Thread Upendra Yadav
Hi, I have initialised kafka consumer: KafkaConsumer consumer = new KafkaConsumer(consumerConfig); and subscribed with topic pattern: consumer.subscribe(Pattern.compile(topicRegex), listener); now, I'm trying to get the list of topics. Map> topicsPartitions = consumer.listTopics(); here topic li