不多说,直接上干货!

  一切来源于官网

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

Step 5: Start a consumer

Step : 消费消息

  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-beginning
This is a message
This 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.

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

1.3 Quick Start中 Step 5: Start a consumer官网剖析(博主推荐)的更多相关文章

  1. 1.3 Quick Start中 Step 4: Send some messages官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 4: Send some messages Step : 发送消息 Kaf ...

  2. 1.3 Quick Start中 Step 2: Start the server官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 2: Start the server Step : 启动服务 Kafka ...

  3. 1.3 Quick Start中 Step 3: Create a topic官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 3: Create a topic Step 3: 创建一个主题(topi ...

  4. 1.3 Quick Start中 Step 1: Download the code官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ 不要局限于,这个版本,我只是以最新的版本,来做个引子,让大家对官网的各个kafka版 ...

  5. 1.1 Introduction中 Kafka as a Storage System官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Kafka as a Storage System kafka作为一个存储系统 An ...

  6. 1.1 Introduction中 Kafka as a Messaging System官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Kafka as a Messaging System kafka作为一个消息系统 ...

  7. 1.3 Quick Start中 Step 8: Use Kafka Streams to process data官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 8: Use Kafka Streams to process data ...

  8. 1.3 Quick Start中 Step 7: Use Kafka Connect to import/export data官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 7: Use Kafka Connect to import/export ...

  9. 1.3 Quick Start中 Step 6: Setting up a multi-broker cluster官网剖析(博主推荐)

    不多说,直接上干货! 一切来源于官网 http://kafka.apache.org/documentation/ Step 6: Setting up a multi-broker cluster ...

随机推荐

  1. POJ 3225 Help with Intervals(线段树)

    POJ 3225 Help with Intervals 题目链接 集合数字有的为1,没有为0,那么几种操作相应就是置为0或置为1或者翻转,这个随便推推就能够了,然后开闭区间的处理方式就是把区间扩大成 ...

  2. Spring MVC数据转换

    样例:把一个字符串封装而一个对象. 如:username:password格式的数据ZhangSan:1234.我们把这个数据封装成一个User对象.以下分别使用属性编辑器与转换器来实现. 1.自己定 ...

  3. 关于APP上架制作二维码相关

    1.安卓版本APP上架并生成二维码问题:安卓版本上架国内市场,这个情况比较复杂一些,比如百度,网址是以上传APP生成的一个编号来进行的,每次升级更新后都发生了变化,也就相当于每次升级后网址发生改变(比 ...

  4. jquery计算两个日期的相差天数

    var days = daysBetween('2016-11-01','2016-11-02'); /** * 根据两个日期,判断相差天数 * @param sDate1 开始日期 如:2016-1 ...

  5. 51nod 矩阵取数问题

    一个N*N矩阵中有不同的正整数,经过这个格子,就能获得相应价值的奖励,从左上走到右下,只能向下向右走,求能够获得的最大价值. f[i][j] = max(f[i-1][j], f[i][j-1]) + ...

  6. MySQL事务(event scheduler)的学习【事务创建之后,没有运行的问题】

    [本篇文章主要解决的是,MySQL事务创建之后,没有运行的问题] 首先从这里开始:http://www.w3schools.in/mysql/event-schedule/,创建了基本的MySQL事务 ...

  7. [React] Validate Custom React Component Props with PropTypes

    In this lesson we'll learn about how you can use the prop-types module to validate a custom React co ...

  8. NStimer 被堵塞

    我们在界面上滚动一个scrollview,那么我们会发如今停止滚动前,会发现NSTimer未被运行.就好像scrollView在滚动的时候将timer暂停了一样,在查看对应文档后发现,这事实上就是ru ...

  9. oracle 数据库批处理文件

    文件夹结构 初始化脚本 |----orcl_sql |----init_user.sql |----tab_home.sql |----TAB_USER.sql |----init.bat init. ...

  10. vim 跨文件复制

    我们都知道,当我们在一个文件之间进行复制粘贴的时候,vim提供给我们的方法非常多,三个模式下都有方法实现字符.句子.段落之间的复制粘贴.当时,如果我们想要在两个文件之间进行复制粘贴,这就有点麻烦了.我 ...