Skip to content

rasgele/kcatpub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kcatpub

Publishes the output of kcat in JSON format.

Usage

Export messages in JSON envelope and parse payload as JSON:

kcat -b localhost:9092 -t source-topic -J -e | jq -c '.payload=(if .payload==null then null else (.payload|fromjson) end)' > output.json

You can publish messages in output.json by:

kcatpub -b localhost:1092 -f output.json -t destination-topic

You can also use the --session option to store or resume a session with a specific name. If you don't provide a session name, it will default to default, but previous session is not continued. This is useful when a large file is being processed and an error occured or program interrupted with CTRL+C.

kcatpub -b localhost:1092 -f output.json -t destination-topic -s my-session

To see available options, run:

kcatpub -h

About

Kafka publisher for data exported via kcat

Resources

License

Stars

Watchers

Forks

Packages

No packages published