1.3 Quick Start中 Step 4: Send some messages官网剖析(博主推荐)
2017-04-26 10:16
471 查看
不多说,直接上干货!
一切来源于官网
![](https://oscdn.geek-share.com/Uploads/Images/Content/201912/02/55251bff2b376f002b8f99315a7fa7bd.png)
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.
Run the producer and then type a few messages into the console to send to the server.
运行producer(生产者),然后在控制台输入几条消息到服务器。
一切来源于官网
http://kafka.apache.org/documentation/
![](https://oscdn.geek-share.com/Uploads/Images/Content/201912/02/55251bff2b376f002b8f99315a7fa7bd.png)
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
相关文章推荐
- 1.3 Quick Start中 Step 8: Use Kafka Streams to process data官网剖析(博主推荐)
- 1.3 Quick Start中 Step 1: Download the code官网剖析(博主推荐)
- 1.3 Quick Start中 Step 2: Start the server官网剖析(博主推荐)
- 1.3 Quick Start中 Step 3: Create a topic官网剖析(博主推荐)
- 1.3 Quick Start中 Step 5: Start a consumer官网剖析(博主推荐)
- 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.2 Use Cases中 Messaging官网剖析(博主推荐)
- 2.4 Connect API官网剖析(博主推荐)
- 1.2 Use Cases中 Website Activity Tracking官网剖析(博主推荐)
- 1.4 Ecosystem官网剖析(博主推荐)
- 2.5 Legacy APIs官网剖析(博主推荐)
- 1.2 Use Cases中 Metrics官网剖析(博主推荐)
- 3. CONFIGURATION官网剖析(博主推荐)
- Flume Channels官网剖析(博主推荐)
- 1.2 Use Cases中 Log Aggregation官网剖析(博主推荐)
- 1.5 Upgrading From Previous Versions官网剖析(博主推荐)
- Flume Channel Selectors官网剖析(博主推荐)
- 1.2 Use Cases中 Stream Processing官网剖析(博主推荐)
- 2. APIS官网剖析(博主推荐)