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 Plain View
Kafka >> mail # user >> kafka and ruby client, beginner questions


+
S Ahmed 2012-05-05, 21:44
+
Sebastian Eichner 2012-05-07, 08:07
Copy link to this message
-
Re: kafka and ruby client, beginner questions
Is it possible to query for a list of offsets?

>From what I understand, each offset is not for a single message, but could
be a group of messages right?

On Mon, May 7, 2012 at 4:07 AM, Sebastian Eichner <[EMAIL PROTECTED]
> wrote:

> Hi!
>
> On Sat, May 5, 2012 at 11:44 PM, S Ahmed <[EMAIL PROTECTED]> wrote:
> > c = Kafka::Consumer.new(:topic => "test")
> > m1 = c.consume
> > []
> >
> > So it says it is empty.
>
> The Ruby-Consumer consumes everything after it was started (in
> lib/kafka/consumer.rb you can see that the offset is automatically set
> to latest_offset on startup).
> You can set your own offset in the Consumer's constructor like
> Kafka::Consumer.new(:offset => 12345) if you want.
>
> To receive messages via the normal consume-method you'd have to create
> them after the consumer was instantiated, so like:
> c = Kafka::Consumer.new(:topic => "test")
> # now run the producer
> m1 = c.consume
> # m1 now contains the newly created messages
>
>
> Sebastian
>
+
Sebastian Eichner 2012-05-07, 13:52
+
S Ahmed 2012-05-07, 13:57
+
Felix GV 2012-05-08, 18:24
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