1.3 Quick Start中 Step 5: Start a consumer官网剖析(博主推荐)
2017-04-26 10:18
489 查看
不多说,直接上干货!
一切来源于官网
![](https://images2015.cnblogs.com/blog/855959/201704/855959-20170426101609678-571262466.png)
Kafka also has a command line consumer that will dump out messages to standard output.
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.
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://kafka.apache.org/documentation/
![](https://images2015.cnblogs.com/blog/855959/201704/855959-20170426101609678-571262466.png)
Step 5: Start a consumer
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-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 2: Start the server官网剖析(博主推荐)
- 1.3 Quick Start中 Step 8: Use Kafka Streams to process data官网剖析(博主推荐)
- 1.3 Quick Start中 Step 3: Create a topic官网剖析(博主推荐)
- 1.3 Quick Start中 Step 4: Send some messages官网剖析(博主推荐)
- 1.3 Quick Start中 Step 6: Setting up a multi-broker cluster官网剖析(博主推荐)
- 1.3 Quick Start中 Step 7: Use Kafka Connect to import/export data官网剖析(博主推荐)
- 1.3 Quick Start中 Step 1: Download the code官网剖析(博主推荐)
- Flume Sink Processors官网剖析(博主推荐)
- 1.1 Introduction中 Distribution官网剖析(博主推荐)
- 1.2 Use Cases中 Messaging官网剖析(博主推荐)
- 2.4 Connect API官网剖析(博主推荐)
- Event Serializers官网剖析(博主推荐)
- 1.1 Introduction中 Producers官网剖析(博主推荐)
- 1.2 Use Cases中 Website Activity Tracking官网剖析(博主推荐)
- 1.4 Ecosystem官网剖析(博主推荐)
- 2.5 Legacy APIs官网剖析(博主推荐)
- Flume Channels官网剖析(博主推荐)
- 1.1 Introduction中 Consumers官网剖析(博主推荐)
- 1.2 Use Cases中 Metrics官网剖析(博主推荐)
- 3. CONFIGURATION官网剖析(博主推荐)