博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1.3 Quick Start中 Step 5: Start a consumer官网剖析(博主推荐)
阅读量:6995 次
发布时间:2019-06-27

本文共 762 字,大约阅读时间需要 2 分钟。

 

 

 

不多说,直接上干货!

 

  一切来源于官网

http://kafka.apache.org/documentation/

 

 

 

 

 

 

Step 5: 消费消息

 

 

 

  Kafka also has a command line consumer that will dump out messages to standard output.

Kafka也提供了一个消费消息的命令行工具,将存储的信息输出出来。
> bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginningThis is a messageThis is another message

  If you have each of the above commands running in a different terminal then you should now be able to type messages into the producer terminal and see them appear in the consumer terminal.

如果你有2台不同的终端上运行上述命令,那么当你在运行生产者时,消费者就能消费到生产者发送的消息。

 

 

 

  All of the command line tools have additional options; running the command with no arguments will display usage information documenting them in more detail.

所有的命令行工具有很多的选项,你可以查看文档来了解更多的功能。

 

转载地址:http://tzsvl.baihongyu.com/

你可能感兴趣的文章
php之验证码
查看>>
struts2文件上传
查看>>
Linux more命令
查看>>
linux监控系统_Zabbix3.0安装过程(n)
查看>>
linux rinetd、socat端口转发部署
查看>>
云服务器 ECS Linux Centos 7 系统 下iptables 服务的使用概述
查看>>
CodeForces 552C Vanya and Scales
查看>>
还原一个真实的华为存储
查看>>
【原创】MySQL 最新商业版备份工具使用方法
查看>>
使用Python开发一个超级简单的接水果小游戏,零基础也可以学会
查看>>
ruby.taobao.org
查看>>
mysql 5.1 变量专题
查看>>
MyEclipse6.5下struts2+spring2+hibernate3 整合
查看>>
android中的JSON解析
查看>>
我的友情链接
查看>>
js模拟表单提交
查看>>
微信小程序开发简易计算器改进版
查看>>
混合背包问题
查看>>
Android studio树形
查看>>
hihoCoder1043
查看>>