Skip to content

Instantly share code, notes, and snippets.

@chenhuawei
Last active August 1, 2019 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenhuawei/0b02d1f8213198784c674bcabba29dc8 to your computer and use it in GitHub Desktop.
Save chenhuawei/0b02d1f8213198784c674bcabba29dc8 to your computer and use it in GitHub Desktop.
kafka cli
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --list
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --group Lbs --describe
./kafka-console-consumer.sh --zookeeper localhost:2181 --topic lbs.location
./kafka-topics.sh --zookeeper localhost:2181 --list
./kafka-topics.sh --zookeeper localhost:2181 --describe --topic lbs.location
# 查看Group
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --list
#./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --group Lbs --describe
# 查看消息消费情况
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group "Lbs"
# 修改消息过期时间
./kafka-topics.sh --zookeeper localhost:2181 --alter --topic lbs.location --config retention.ms=500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment