- 从头开始获取 20 条数据(等价于时间升序)
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic your-topic --from-beginning --max-messages 20文章来源:https://www.toymoban.com/news/detail-625990.html
- 获取最新 20 条数据(等价于时间降序)去掉 --from-beginning 即可(默认)
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic your-topic --max-messages 20文章来源地址https://www.toymoban.com/news/detail-625990.html
到了这里,关于Kafka - 获取 Topic 生产者发布数据命令的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!