December 2018
Beginner
186 pages
4h 10m
English
Kafka also has a command to send messages through the command line; the input can be a text file or the console standard input. Each line typed in the input is sent as a single message to the cluster.
For this section, the execution of the previous steps is needed. The Kafka brokers must be up and running and a topic created inside them.
In a new command-line window, run the following command, followed by the lines to be sent as messages to the server:
> <confluent-path>/bin/kafka-console-producer --broker-list localhost:9093 --topic amazingTopicFool me once shame on youFool me twice shame on me
These lines push two messages into the amazingTopic running on the localhost cluster on the 9093 port.
This command ...
Read now
Unlock full access