1
votes

I read that in kafka docs: Kafka also has a command line consumer that will dump out messages to standard output.

bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

I wonder that if I want to consumer messages and push them to another output, what options to be add to the above command. kafka-console-consumer does not have --help option, I can't find any parameters, options for command.

Thank you

1

1 Answers

0
votes

The default consumer can only output to console, unless you would want to download and modify the code.

It's very easy to write a simple consumer and output to other format or do something else with it.

A sample code is listed at https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example