on-internet
← Community

Kafka Consumer to read from multiple topics

Stack Overflow ·

I am very new to Kafka. I am creating two topics and publishing on these two topics from two Producers. I have one consumer which consumes the messages from both the topics. This is because I want to process according to the priority. I am getting a stream from both the topics but as soon as I start iterating on ConsumerItreator of any stream, it blocks there. As it's written in documentation, it will be blocked till it gets a new message. Is any one aware of how to read from two topics and two streams from a single Kafka Consumer? Map<String, Integer> topicCountMap = new HashMap<String, Integ

Comments

Sign in or sign up to comment and upvote.

No comments yet.