Home | About | Sematext search-lucene.com search-hadoop.com search-devops.com metrics + logs = try SPM and Logsene for free
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 >> OffsetOutOfRangeException and getOffsetsBefore


Copy link to this message
-
Re: OffsetOutOfRangeException and getOffsetsBefore
Since you are using the simple consumer you will need to handle the OffsetOutOfRange Exception in your code. This happens when your consumer queries for an offset which is no longer persisted in Kafka (The logs have been deleted based on the retention policy). Ideally when this happens, the consumer should issue an OffsetRequest to get the latest/earliest offset currently available on the server. You can then use this in your FetchRequest. Whether you use the latest or earliest depends on your application needs. In essence, you are resetting the consumer to catch up with the server.

On May 24, 2013, at 11:29 AM, Sining Ma <[EMAIL PROTECTED]> wrote:

 
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