The SimpleConsumer API [1] has a method called getOffsetsBefore which takes a topic, partition, timestamp (UNIX I assume since it's a long) and integer limit on how many offsets to get. Might not solve your problem *exactly*, but could be useful, unless you're using the ConsumerConnector? [1]: http://people.apache.org/~joestein/kafka-0.7.1-incubating-docs/ -- Mathias Söderberg
↧