By request/reply pattern I meant this:
http://www.eaipatterns.com/RequestReply.html In this pattern client posts request on a queue and server sends the response on another queue. The jmsReplyTo property on a JMS message is commonly used to identify the response queue name. On Fri, Oct 10, 2014 at 4:58 PM, Harsha <ka...@harsha.io> wrote: > Mohit, > Kafka uses gradle to build the project, check the README.md > under source dir for details on how to build and run unit > tests. > You can find consumer and producer api here > http://kafka.apache.org/documentation.html and also more details on > consumer http://kafka.apache.org/documentation.html#theconsumer > 1) Follow request/reply pattern > Incase if you are looking for producers waiting for a reply from > broker if the message is successfully returned , yes there is a > configurable option "request.required.acks" in producer config. > 2) Normal pub/sub with multi-threaded consumers > Here is a producer example > > https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example > and consumer > > https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example > 3) multi threaded consumers with different group ids. > you can use the same consumer group example and use different group > id to run it > > https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example > > "I see in some examples that iterator is being used, is there also a > notion of listeners or is everything > iterators?" > Kafka consumer works by making fetch requests to the brokers .There > is no need to place the while loop over the iterator. > ConsumerIterator will take care of it for you. It uses long polling > to listen for messages on the broker and blocks those fetch requests > until there is data available. > > hope that helps. > > -Harsha > On Fri, Oct 10, 2014, at 12:32 PM, Mohit Anchlia wrote: > > I am new to Kafka and very little familiarity with Scala. I see that the > > build requires "sbt" tool, but do I also need to install Scala > > separately? > > Is there a detailed documentation on software requirements on the broker > > machine. > > > > I am also looking for 3 different types of java examples 1) Follow > > request/reply pattern 2) Normal pub/sub with multi-threaded consumers 3) > > multi threaded consumers with different group ids. I am trying to > > understand how the code works for these 2 scenarios. > > > > Last question is around consumers. I see in some examples that iterator > > is > > being used, is there also a notion of listeners or is everything > > iterators? > > In other words in real world would we place the iterator in a while loop > > to > > continuously grab messages? It would be helpful to see some practical > > examples. >