/SimpleKafkaProducer

Simple Kafka Producer command line tool

Primary LanguageJavaScriptApache License 2.0Apache-2.0

simpleKafkaProducer

Sends hex kafka messages provided as stdin to Kafka host and topic defined in the config.json file.

Instalation

Install globally:

$ npm i https://github.com/wsihmh/SimpleKafkaProducer.git -g

Due to temporary issues the script isn't published to HMH Artifactory NPM yet.

$ npm i simple-kafka-producer -g

Usage

Usage: index [options]

Options:
  -V, --version                    output the version number
  -c, --config <config-file.json>  Config file, otherwise reads default one
  -h, --help                       output usage information

Examples

$ echo "000000003d146c6f67696e436f756e744832373065666635622d303635652d343634322d386363622d3037333131326436393932370000" | simple-kafka-producer

Use avro-converter together with simple-kafka-producer:

$ avro-converter -i /usr/local/lib/node_modules/avro-converter/sample/input-2.json | simple-kafka-producer