Re: Offset Request with timestamp

2014-09-14 Thread Neha Narkhede
I added this question to the FAQ as it frequently comes up - https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-HowdoIaccuratelygetoffsetsofmessagesforacertaintimestampusingOffsetFetchRequest ? On Tue, Sep 2, 2014 at 1:48 PM, Guozhang Wang wrote: > The semantic of the offset API is to "r

Re: Offset Request with timestamp

2014-09-02 Thread Guozhang Wang
The semantic of the offset API is to "return the latest possible offset of the message that is appended no later than the given timestamp". For implementation, it will get the starting offset of the log segment that is created no later than the given timestamp, and hence if your log segment contain

Offset Request with timestamp

2014-09-02 Thread Manjunath Shivakumar
Hi, My usecase is to fetch the offsets for a given topic from X milliseconds ago. If I use the offset api https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-OffsetAPI to do this and pass in a timestamp of (now() - X), I get the earliest offse