Skip to content

Instantly share code, notes, and snippets.

@chadmcrowell
Created June 19, 2019 15:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save chadmcrowell/313147b0a8e66a1a49f46916369e5176 to your computer and use it in GitHub Desktop.
Save chadmcrowell/313147b0a8e66a1a49f46916369e5176 to your computer and use it in GitHub Desktop.
Topic Configurations
# List all the consumer groups
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--list
# Describe a specific consumer group
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--describe \
--group application1
# Describe the active members of the group
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--describe \
--group application1 \
--members
# If the group has active members, get a more verbose output
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--describe \
--group application1 \
--members \
--verbose
# Describe the state of the group
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--describe \
--group application1 \
--state
# Delete a consumer group (only works if there are no active members).
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--delete \
--group application1
# Delete multiple consumer groups
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--delete \
--group application1 \
--group application2
# Reset offsets for a consumer group
bin/kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--reset-offsets \
--group application1 \
--topic topic-1 \
--to-latest
@chadmcrowell
Copy link
Author

Click here to get back to the Apache Kafka Deep Dive Interactive Diagram: https://www.lucidchart.com/documents/view/556d9075-a316-4d40-b5dc-225c4353d1e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment