Ok I understard why I should reset the offset, but why would I want to reset
to the current one? I mean, am I not always at the current offset by definition?
I don't know if I am missing something, but if I describe a consumer group and
I see
TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG
test_topic 1 52 55
3
test_topic 0 59 71
12
and now I want to reset --to-current, I obtain:
TOPIC PARTITION NEW-OFFSET
test_topic 1 52
test_topic 0 59
Apparently nothing changed, are there any benefits in resetting --to-current?
I hope everything is clear.
Lorenzo
Lorenzo Rovere
Technology Reply
Via Avogadri, 2
31057 - Silea (TV) - ITALY
phone: +39 0422 1836521
[email protected]
www.reply.it
-----Messaggio originale-----
Da: mangat rai <[email protected]>
Inviato: 6 May, 2021 11:51 AM
A: [email protected]
Oggetto: Re: kafka-consumer-groups option
Hey Lorenzo Rovere,
Consider the case where you want to reprocess all the data. Let's say your
process had a bug. You fixed it and now you want to reprocess everything to
produce the correct output.
Similarly, there can be other use cases for resetting the consumer offsets and
reprocessing the input.
Regards,
Mangat
On Thu, May 6, 2021 at 11:25 AM Rovere Lorenzo <[email protected]> wrote:
> Hi,
>
> I’m playing with the kafka-consumer-groups.sh command.
>
> I wanted to ask the utility of the *--to-current* option used to
> *reset offsets of a consumer group to current offset*. The thing I
> don’t understand is in which scenario I would want to use this option.
> If I’m already at the current offset, why would I need to reset to the
> offset I’m already at?
>
> Thanks in advance
>
>
>
> Lorenzo Rovere
>
>
>
>
>
> Lorenzo Rovere
>
> Technology Reply
> Via Avogadri, 2
> 31057 - Silea (TV) - ITALY
> phone: +39 0422 1836521
> [email protected]
> www.reply.it
>
> [image: Technology Reply]
>