kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shayne S <shaynest...@gmail.com>
Subject Re: Kafka producer input file
Date Sun, 12 Jul 2015 01:35:00 GMT
The console producer will read from STDIN. Assuming you are using 0.8.2,
you can pipe the file right in like this:

kafka-console-produce.sh --broker-list localhost:9092 --topic my_topic
--new-producer < my_file.txt

On Sat, Jul 11, 2015 at 6:32 PM, tsoliman@gmail.com <tsoliman@gmail.com>
wrote:

> Hello, I am trying to setup a Kafka producer to take input from a file
> instead of standard input. According to Kafka documentation
> <https://kafka.apache.org/documentation.html>:
>
> 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.
>
>
> I could not seem to find any documentation on how the the command line
> client can read from a file. Could you please help?
>
> Thanks,
> Tim
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message