some command line golang kafka clients to test and demo basic usage of different golang kafka client libs
github.com/confluentinc/confluent-kafka-go
github.com/segmentio/kafka-go
open 3 terminal sessions
from root dir of this repo :
> docker-compose up
this will start a minimal docker based kafka cluster comprised of zookeeper and a single kafka broker.
in separate terminal session
> cd kafka-go
> make producer
in separate terminal session
> cd kafka-go
> make consumer
confluent libs use cgo wrapper to implement the kafka sdk You may need to install a working gcc ( yum install devtools (or similar) ) in your environment to allow the go build of the client lib to suceed.
in separate terminal session
> cd confluent
> make producer config=./config_local.properties
in separate terminal session
> cd confluent
> make consumer config=./config_local.properties