I am very new to Apache Kafka. I am given a task to write a consumer that will consume messages from topic(s). Below are my queries:
Should I tell my consumer Java program by providing the topic name explicitly (by passing as argument to main method) or is there any way by which it automatically discovers the topics?
I read somewhere that consumer program should be multi-threaded and after going through this link https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example, I think that it is creating number of threads for reading from single topic.
I thought what multi-threaded means is that my consumer program should spawn as many threads as topics are. If I have to read messages from, say, 3 topics, then do I need to start 3 consumer programs one for each topic? Can't I do the same in single program? Please clarify.
I read there are two types of consumer programs: Simple and High Level. I don't know which one to write.
How can I get started on this?