Pete, have you looked at Kafka's Streams API yet?
There are many examples available in the `kafka-streams` folder at https://github.com/confluentinc/examples. The simplest example of "Do sth to a new data record as soon as it arrives" might be the MapFunctionLambdaExample. You can create different KStream instances for different topics and then use a different map() operation for each KStream, for example. -Michael On Thu, Feb 23, 2017 at 4:39 AM, Vahid S Hashemian < vahidhashem...@us.ibm.com> wrote: > Pete, > > I think this excellent post covers what you are looking for: > https://www.confluent.io/blog/tutorial-getting-started-with- > the-new-apache-kafka-0-9-consumer-client/ > > --Vahid > > > > > From: Peter Figliozzi <pete.figlio...@gmail.com> > To: users@kafka.apache.org > Date: 02/22/2017 07:29 PM > Subject: Simple data-driven app design using Kafka > > > > Hello Kafka Users, > > I started using Kafka a couple of weeks ago an am very impressed! I've > gotten the hang of producing, and now it's time for consuming. My > applications (Scala) don't work quite like the examples, but I think it's > a > pretty basic architecture: > > > - Suppose you have a several topics: foo, bar, and baz > - When a new data element arrives in a particular topic, perform the > topic-specific task with the new data i.e. DoFoo(newfoo) > - Otherwise, do nothing > > > Can anyone point to an example or even sketch it out here? > > Thanks much, > > Pete > > > > >