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: