- 從頭開始獲取 20 條數(shù)據(jù)(等價于時間升序)
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic your-topic --from-beginning --max-messages 20文章來源:http://www.zghlxwxcb.cn/news/detail-625990.html
- 獲取最新 20 條數(shù)據(jù)(等價于時間降序)去掉 --from-beginning 即可(默認)
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic your-topic?--max-messages 20文章來源地址http://www.zghlxwxcb.cn/news/detail-625990.html
到了這里,關(guān)于Kafka - 獲取 Topic 生產(chǎn)者發(fā)布數(shù)據(jù)命令的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!