Skip to content

Instantly share code, notes, and snippets.

@vinodkc
Last active February 21, 2019 03:57
Show Gist options
  • Save vinodkc/bd18530a3b755557abc525867ab2b95f to your computer and use it in GitHub Desktop.
Save vinodkc/bd18530a3b755557abc525867ab2b95f to your computer and use it in GitHub Desktop.
List all [Inactive,active] Consumer groups in Kafka
./kafka-console-consumer.sh --bootstrap-server c320-node2.squadron-labs.com:6667 --topic __consumer_offsets --from-beginning --security-protocol SASL_PLAINTEXT --formatter "kafka.coordinator.group.GroupMetadataManager\$OffsetsMessageFormatter" --max-messages 10000 | cut -d, -f1 | cut -d[ -f2 | sort | uniq
Note:
1)Tune value of --max-messages to get more output,if any
2)Remove --security-protocol SASL_PLAINTEXT if not a secure cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment