[ 
https://issues.apache.org/jira/browse/KAFKA-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16110707#comment-16110707
 ] 

Tom Bentley commented on KAFKA-5459:
------------------------------------

[~huxi_2b] the use case I had in mind was a simple one: Wanting to send the 
output of a shell command or pipline as a single message, for example

{{ps | grep my_process | kafka-console-producer.sh ...}}

In this use case there is no natural key. You could use the time you executed 
the command, or the host you executed the command on, or a number of other 
things. In hindsight I'm not really convinced that this addition would really 
be useful enough to warrant inclusion in Kafka itself. If someone wanted this 
sort of thing it would be easy enough for them to write it themselves, and thus 
use the right key for them.

> Support kafka-console-producer.sh messages as whole file
> --------------------------------------------------------
>
>                 Key: KAFKA-5459
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5459
>             Project: Kafka
>          Issue Type: Improvement
>          Components: tools
>    Affects Versions: 0.10.2.1
>            Reporter: Tom Bentley
>            Priority: Trivial
>
> {{kafka-console-producer.sh}} treats each line read as a separate message. 
> This can be controlled using the {{--line-reader}} option and the 
> corresponding {{MessageReader}} trait. It would be useful to have built-in 
> support for sending the whole input stream/file as the message. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to