Hi Kojie,

As Jun's FAQ indicates, today the only way you can do is to set/reset the
offset directly with Zookeeper. In addition, currently we do not have
correlations between offsets and timestamps, meaning that given a timestamp
you can not tell which message's offset is produced at around that time.
Can you file a jira about keeping track of the correlation between offsets
and timestamps?

Guozhang


On Mon, Oct 21, 2013 at 7:56 AM, Jun Rao <jun...@gmail.com> wrote:

> 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
> >
>



-- 
-- Guozhang

Reply via email to