yes,thanks.that is what we wanted ! we now use the metrics info [LogEndOffset] compute the offset some seconds ago in each partition. and then use importZKOffsets ,It works !
thanks very much! kojie.fu From: Jun Rao Date: 2013-10-21 22:56 To: users@kafka.apache.org; kojie.fu Subject: Re: Re: how can i use offset filter the msg Just added an FAQ. Does that answer your question? https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-HowcanIrewindtheoffsetintheconsumer%3F Thanks, Jun On Sun, Oct 20, 2013 at 11:15 PM, kojie.fu <kojie...@gmail.com> wrote: hi guozhang, i mean ,in a certain topic ,can i use the offset compute the msg's time stamp(when the msg produced)? in fact, i need an api look like: setOffset(String topicId ,String groupId, long timeStamp){ } this method can be call by the comsumer ,and then the offset will be reset. after call this method,the comsumer only comsume the msg occur after the timeStamp. i am very sorry .I do not specify whether I describe clearly. From: Guozhang Wang Date: 2013-10-21 12:49 To: users@kafka.apache.org; kojie.fu Subject: Re: how can i use offset filter the msg Hello, I do not fully understanding your question, did you mean that you want to know when a message with certain offset is produced? Guozhang On Sun, Oct 20, 2013 at 8:54 PM, kojie.fu <kojie...@gmail.com> wrote: Hi all, we have a scene like this: A system produce the msg ,B system comsumer the msg. for some reason the B system unwork,and then we need abandon the out of date msg. but now in our msg there is no time stamp. how can i use the offset to do this. does kafka know when the msg produce? how can i location the certain offset? thanks -- -- Guozhang