您的位置:首页 > 产品设计 > UI/UE

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

2017-04-26 10:16 471 查看
不多说,直接上干货!

  一切来源于官网

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




Step 4: Send some messages

Step 4: 发送消息


  Kafka comes with a command line client that will take input from a file or from standard input and send it out as messages to the Kafka cluster. By default, each line will be sent as a separate message.

Kafka提供了一个命令行的工具,可以从输入文件或者命令行中读取消息并发送给Kafka集群。每一行是一条消息。


  Run the producer and then type a few messages into the console to send to the server.

运行producer(生产者),然后在控制台输入几条消息到服务器。
> bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
This is a message
This is another message
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: