Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> Getting my Kafka code example working out of the box


Copy link to this message
-
Re: Getting my Kafka code example working out of the box
It might be you are starting a consumer after the messages are produced and
since your consumer is starting for the first time when it registers with
ZK you won't see messages since the default is to start at the largest
offset.

so, try starting ZK, the broker and your consumer and then start up the
producer and send messages (or set auto.offset.reset to smallest
http://kafka.apache.org/documentation.html#consumerconfigs) that "might" be
the issue.

On a related note, I have a client that I have been working with on this
exact same type of scenario and the solution I am providing is based on
vagrant and puppet so with a single command then can enter the VM all ready
to go and up and running and they are good to go with their development.
 Once that is done and good to go I should be able to open source and
contribute it back into the project (if folks want) as a Vagrantfile for
Kafka so folks can "vagrant up" and get going (let me know).
On Thu, Nov 7, 2013 at 8:35 PM, S L <[EMAIL PROTECTED]> wrote:

> Hi,
>
> This might be a really, really simple question but how do I get my test
> Kafka program working out of the box?  I followed the directions from
> http://kafka.apache.org/documentation.html#quickstart.  I started zk, the
> server, the producer and consumer.  I played with the producer, sending
> msgs to the consumer, which I saw show up in its terminal.  This was to the
> "page_visits" topic, as specified in the example program.
>
> I then went to
> https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Exampleand
> copied the files into netbeans and built it.  I also added jar files
> kafka-assembly-0.8.0-deps.jar and kafka_2.8.0-0.8.0-beta1.jar to make the
> build work if that makes a difference.
>
> Anyway, I then ran java -jar myjar.jar.  I expected to see a message show
> up in the consumer, but nothing shows up.  I sent another msg from the
> producer just to make sure the consumer was still connected, which it was
> b/c the consumer received it.
>
> I'm at wits end.  I know this is an extremely simple question and
> everything looks identical to the links above and should be working.
>  However, I'm not getting a message in the consumer.  Much thanks for any
> help you can give me.  I'm about to ram my head into a wall.
>

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB