1 Listing Topics and Consumer Groups:
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group nl.logius.bbo.DigikoppelingVerwerkingsverslagAdapter --describe
2 Identifying Earliest Offsets for a Topic:
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic digikoppeling-events --time -2
Result:
`<topic>:<partition>:<earliest_offset>`
3 Resetting Offsets for a whole Topic:
- Apply the `--reset-offsets` command to shift offsets.
`reset-offsets` requires one of the following scenarios: `by-duration, to-offset, from-file, to-datetime, to-earliest, to-current, shift-by, to-latest`
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group nl.logius.bbo.DigikoppelingVerwerkingsverslagAdapter --reset-offsets --shift-by -1 --topic digikoppeling-events --dry-run
4 Partition-Specific Offset Reset:
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group nl.logius.bbo.DigikoppelingVerwerkingsverslagAdapter --reset-offsets --shift-by -1 --topic digikoppeling-events:8 --dry-run
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group nl.logius.bbo.DigikoppelingVerwerkingsverslagAdapter --reset-offsets --shift-by -1 --topic digikoppeling-events:8 --execute