2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-03 15:40:17 +00:00
cheat.sheets/sheets/kafka-consumer-groups
2019-06-27 14:20:54 +03:00

35 lines
1.2 KiB
Plaintext

# kafka-consumer-groups
#
# A command-line tool to manage Kafka consumer groups
#
# see https://kafka.apache.org/documentation/#basic_ops_consumer_group
# list all consumer groups
kafka-consumer-groups --bootstrap-server localhost:9092 --list
# describe a consumer group
kafka-consumer-groups --bootstrap-server localhost:9092 \
--group group-name \
--describe
# reset consumer offsets for a topic to the earliest offset
kafka-consumer-groups --bootstrap-server localhost:9092 \
--group group-name \
--reset-offsets \
--to-earliest \
--topic topic-name \
--execute
# reset consumer offsets for all topics to the earliest offset
kafka-consumer-groups --bootstrap-server localhost:9092 \
--group group-name \
--reset-offsets \
--to-earliest \
--all-topics \
--execute
# delete a consumer group
kafka-consumer-groups --bootstrap-server localhost:9092 \
--group group-name \
--delete