You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Hema Bhatia <He...@apollo.edu> on 2014/03/07 00:09:12 UTC

how to find start offset of messages stored at kafka broker

Hi,

Is there a way to get the start offset of messages present at current point in kafka broker, given the topic and partition. I am using high-level consumer, and I want to replay messages from a given offset. I am using replication factor 1 and single partition, and I am using high level consumer api.

Thanks,
Hema

________________________________
This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.


Re: how to find start offset of messages stored at kafka broker

Posted by Jun Rao <ju...@gmail.com>.
You can use the getOffsetBefore api. Take a look at
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example

Thanks,

Jun


On Thu, Mar 6, 2014 at 3:09 PM, Hema Bhatia <He...@apollo.edu> wrote:

> Hi,
>
> Is there a way to get the start offset of messages present at current
> point in kafka broker, given the topic and partition. I am using high-level
> consumer, and I want to replay messages from a given offset. I am using
> replication factor 1 and single partition, and I am using high level
> consumer api.
>
> Thanks,
> Hema
>
> ________________________________
> This message is private and confidential. If you have received it in
> error, please notify the sender and remove it from your system.
>
>