You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Chris Peart <ch...@peart.me.uk> on 2022/09/05 08:42:04 UTC
Re: Unable to reset kafka offset in a consumer group
Hi Luke,
I could not get the consumer group to be inactive even when stopping all
the consumers in the group.
Due this this being a production system i was unable to play to much
with the kafka-consumer-groups --reset-offsets --shift-by command, so i
had to run the following command:
kafka-run-class kafka.tools.UpdateOffsetsInZK latest (properties file
containing kafka brokers) topicname
After doing this i consumed the missing offsets to file and the used
kafka-producer to read from the file to the affected topic.
Hope this makes sense, i know there are better probably ways to do this
but needed a quick and dirty fix :)
Thanks,
Chris
On 2022-08-29 07:16, Luke Chen wrote:
> Hi Chris,
>
> Great to hear you found a way to work around it now.
> Could you share your solution here in case other people got stuck on
> the
> same issue?
>
> Thank you
> Luke
>
> On Fri, Aug 26, 2022 at 11:57 PM Chris Peart <ch...@peart.me.uk> wrote:
>
> Thanks Luke,
> The problem I was having was that the consumer group was not inactive
> even
> with all the consumers stopped.
> Managed to work around this now.
>
> Many Thanks
> Chris
>
> On 25 Aug 2022, at 10:12 am, Luke Chen <sh...@gmail.com> wrote:
> Hi Chris,
>
> is there a way to force the offset forward by an increment of 1 just
> for this topic?
> kafka-consumer-groups.sh script has an option `--shift-by` to shift
current
> offset by 'n'.
> I think this is what you are looking for.
>
> Thank you
> Luke
>
> On Thu, Aug 25, 2022 at 4:25 PM Chris Peart <ch...@peart.me.uk> wrote:
>
>> Hi All,
>>
>> I'm trying to reset a kafka offset for a topic in a consumer group, i
>> have stopped all the consumers using the consumer group but i'm still
>> receiving the message that the current state is stable.
>>
>> Is there a way to put the consumer group to an inactive state after
>> stopping all the consumers or is there a way to force the offset
>> forward
>> by an increment of 1 just for this topic?
>>
>> Many Thanks,
>>
>> Chris