AnsweredAssumed Answered

Using KafkaConsumer to subscribe topics with a Pattern

Question asked by maheshsr on Jan 22, 2017
Latest reply on Jan 19, 2018 by jamesrgrinter



 I was trying to use consumer.subscribe(Pattern pattern, ConsumerRebalanceListener listener) method to subscribe to topics which matches a pattern. I could't find an example on how to do this. I tried multiple options. Should we mention the regex with the stream path in it ? I tried with specifying "" and a regex for the topic name. I even tried giving the regex like ".*/user/mapr/object-stream:XYZ.*". Its not working. Can someone provide an example on how to do this ?