Skip to content

Instantly share code, notes, and snippets.

@alexandreaquiles
Last active June 2, 2020 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandreaquiles/6f3603b18d93ffab8e966905cef84232 to your computer and use it in GitHub Desktop.
Save alexandreaquiles/6f3603b18d93ffab8e966905cef84232 to your computer and use it in GitHub Desktop.
Kafka Consumer Groups, Offsets and Partitions
  • Create a topic with 3 partitions: bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic TEST --partitions 3
  • Alter the number of partitions of an existing topic to 3: bin/kafka-topics.sh --bootstrap-server localhost:9092 --alter --topic BOOK_ORDERS --partitions 3
  • List consumer groups: bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
  • Describe consumers groups and its partitions and offsets: bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group EbookGeneratorService
  • Describe partitions and offsets of all consumer groups: bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --all-groups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment