# Install Java brew tap homebrew/cask-versions brew tap adoptopenjdk/openjdk brew cask install java java --version # Get Kafka wget https://www2.apache.paket.ua/kafka/2.5.0/kafka_2.12-2.5.0.tgz # Unpack tar xvf kafka_2.12-2.5.0.tgz cd kafka_2.12-2.5.0/bin # List the groups ./kafka-consumer-groups.sh --bootstrap-server --list # List the topics to which the group is subscribed ./kafka-consumer-groups.sh --bootstrap-server --group --describe # Reset the consumer offset for a topic (preview) ./kafka-consumer-groups.sh --bootstrap-server --group --topic --reset-offsets --to-earliest # Reset the consumer offset for a topic ./kafka-consumer-groups.sh --bootstrap-server --group --topic --reset-offsets --to-earliest --execute # * The consumer group must have no running instance when performing the reset. Otherwise the reset will be rejected. # * There are many other resetting options, run kafka-consumer-groups for details # --shift-by # --to-current # --to-latest # --to-offset # --to-datetime # --by-duration # * The command also provides an option to reset offsets for all topics the consumer group subscribes to: --all-topics