You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Alexey Borschenko <ab...@elance-odesk.com> on 2015/04/20 13:07:37 UTC

SimpleConsumer.getOffsetsBefore

Does *SimpleConsumer.getOffsetsBefore* takes in account consumer group
specific offsets?

I need to be able to get offsets closest to specified timestamp per
topic-consumerGroup.

Is there any way to achieve this using Kafka API ?

Thanx!

Re: SimpleConsumer.getOffsetsBefore

Posted by Gwen Shapira <gs...@cloudera.com>.
1. getOffsetsBefore is per partition, not per consumer group. The
SimpleConsumer is completely unaware of consumer groups.
2. "offsets closest to specified timestamp per topic-consumerGroup" <-
I'm not sure I understand what you mean. Each consumer group persists
one offset per partition, thats the last offset it read. There is no
"offset closest to timestamp" for a specific consumer group.

Gwen

On Mon, Apr 20, 2015 at 4:07 AM, Alexey Borschenko
<ab...@elance-odesk.com> wrote:
> Does *SimpleConsumer.getOffsetsBefore* takes in account consumer group
> specific offsets?
>
> I need to be able to get offsets closest to specified timestamp per
> topic-consumerGroup.
>
> Is there any way to achieve this using Kafka API ?
>
> Thanx!